In [1]:
conda install -c pyviz hvplot
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.8.2
  latest version: 4.8.3

Please update conda by running

    $ conda update -n base conda



# All requested packages already installed.


Note: you may need to restart the kernel to use updated packages.
In [2]:
!pip install hvplot
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already satisfied: hvplot in /srv/conda/envs/notebook/lib/python3.7/site-packages (0.5.2)
Requirement already satisfied: bokeh>=1.0.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from hvplot) (2.0.1)
Requirement already satisfied: colorcet in /srv/conda/envs/notebook/lib/python3.7/site-packages (from hvplot) (2.0.2)
Requirement already satisfied: holoviews>=1.11.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from hvplot) (1.13.2)
Requirement already satisfied: pandas in /srv/conda/envs/notebook/lib/python3.7/site-packages (from hvplot) (0.24.2)
Requirement already satisfied: typing-extensions>=3.7.4 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bokeh>=1.0.0->hvplot) (3.7.4.1)
Requirement already satisfied: PyYAML>=3.10 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bokeh>=1.0.0->hvplot) (5.3.1)
Requirement already satisfied: pillow>=4.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bokeh>=1.0.0->hvplot) (7.1.1)
Requirement already satisfied: numpy>=1.11.3 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bokeh>=1.0.0->hvplot) (1.18.1)
Requirement already satisfied: tornado>=5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bokeh>=1.0.0->hvplot) (6.0.3)
Requirement already satisfied: packaging>=16.8 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bokeh>=1.0.0->hvplot) (20.1)
Requirement already satisfied: Jinja2>=2.7 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bokeh>=1.0.0->hvplot) (2.11.0)
Requirement already satisfied: python-dateutil>=2.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bokeh>=1.0.0->hvplot) (2.8.1)
Requirement already satisfied: param>=1.7.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from colorcet->hvplot) (1.9.3)
Requirement already satisfied: pyct>=0.4.4 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from colorcet->hvplot) (0.4.6)
Requirement already satisfied: pyviz_comms>=0.7.3 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from holoviews>=1.11.0->hvplot) (0.7.4)
Requirement already satisfied: panel>=0.7.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from holoviews>=1.11.0->hvplot) (0.9.5)
Requirement already satisfied: pytz>=2011k in /srv/conda/envs/notebook/lib/python3.7/site-packages (from pandas->hvplot) (2019.3)
Requirement already satisfied: six in /srv/conda/envs/notebook/lib/python3.7/site-packages (from packaging>=16.8->bokeh>=1.0.0->hvplot) (1.14.0)
Requirement already satisfied: pyparsing>=2.0.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from packaging>=16.8->bokeh>=1.0.0->hvplot) (2.4.7)
Requirement already satisfied: MarkupSafe>=0.23 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Jinja2>=2.7->bokeh>=1.0.0->hvplot) (1.1.1)
Requirement already satisfied: markdown in /srv/conda/envs/notebook/lib/python3.7/site-packages (from panel>=0.7.0->holoviews>=1.11.0->hvplot) (3.2.1)
Requirement already satisfied: tqdm in /srv/conda/envs/notebook/lib/python3.7/site-packages (from panel>=0.7.0->holoviews>=1.11.0->hvplot) (4.46.0)
Requirement already satisfied: setuptools>=36 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from markdown->panel>=0.7.0->holoviews>=1.11.0->hvplot) (45.1.0.post20200119)
In [3]:
!pip install numpy

!pip install <package>
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already satisfied: numpy in /srv/conda/envs/notebook/lib/python3.7/site-packages (1.18.1)
/bin/sh: 1: Syntax error: end of file unexpected
In [4]:
!pip install Bokeh
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already satisfied: Bokeh in /srv/conda/envs/notebook/lib/python3.7/site-packages (2.0.1)
Requirement already satisfied: tornado>=5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (6.0.3)
Requirement already satisfied: Jinja2>=2.7 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (2.11.0)
Requirement already satisfied: pillow>=4.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (7.1.1)
Requirement already satisfied: numpy>=1.11.3 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (1.18.1)
Requirement already satisfied: PyYAML>=3.10 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (5.3.1)
Requirement already satisfied: python-dateutil>=2.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (2.8.1)
Requirement already satisfied: typing-extensions>=3.7.4 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (3.7.4.1)
Requirement already satisfied: packaging>=16.8 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (20.1)
Requirement already satisfied: MarkupSafe>=0.23 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Jinja2>=2.7->Bokeh) (1.1.1)
Requirement already satisfied: six>=1.5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from python-dateutil>=2.1->Bokeh) (1.14.0)
Requirement already satisfied: pyparsing>=2.0.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from packaging>=16.8->Bokeh) (2.4.7)
In [5]:
!pip install Bokeh
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already satisfied: Bokeh in /srv/conda/envs/notebook/lib/python3.7/site-packages (2.0.1)
Requirement already satisfied: pillow>=4.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (7.1.1)
Requirement already satisfied: python-dateutil>=2.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (2.8.1)
Requirement already satisfied: packaging>=16.8 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (20.1)
Requirement already satisfied: tornado>=5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (6.0.3)
Requirement already satisfied: Jinja2>=2.7 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (2.11.0)
Requirement already satisfied: typing-extensions>=3.7.4 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (3.7.4.1)
Requirement already satisfied: PyYAML>=3.10 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (5.3.1)
Requirement already satisfied: numpy>=1.11.3 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Bokeh) (1.18.1)
Requirement already satisfied: six>=1.5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from python-dateutil>=2.1->Bokeh) (1.14.0)
Requirement already satisfied: pyparsing>=2.0.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from packaging>=16.8->Bokeh) (2.4.7)
Requirement already satisfied: MarkupSafe>=0.23 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from Jinja2>=2.7->Bokeh) (1.1.1)
In [6]:
pip install xlrd
Requirement already satisfied: xlrd in /srv/conda/envs/notebook/lib/python3.7/site-packages (1.2.0)
Note: you may need to restart the kernel to use updated packages.
In [7]:
!pip install descartes
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already satisfied: descartes in /srv/conda/envs/notebook/lib/python3.7/site-packages (1.1.0)
Requirement already satisfied: matplotlib in /srv/conda/envs/notebook/lib/python3.7/site-packages (from descartes) (3.1.3)
Requirement already satisfied: python-dateutil>=2.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from matplotlib->descartes) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from matplotlib->descartes) (1.2.0)
Requirement already satisfied: cycler>=0.10 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from matplotlib->descartes) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from matplotlib->descartes) (2.4.7)
Requirement already satisfied: numpy>=1.11 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from matplotlib->descartes) (1.18.1)
Requirement already satisfied: six>=1.5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from python-dateutil>=2.1->matplotlib->descartes) (1.14.0)
In [8]:
pip install folium
Requirement already satisfied: folium in /srv/conda/envs/notebook/lib/python3.7/site-packages (0.10.1)
Requirement already satisfied: requests in /srv/conda/envs/notebook/lib/python3.7/site-packages (from folium) (2.22.0)
Requirement already satisfied: jinja2>=2.9 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from folium) (2.11.0)
Requirement already satisfied: numpy in /srv/conda/envs/notebook/lib/python3.7/site-packages (from folium) (1.18.1)
Requirement already satisfied: branca>=0.3.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from folium) (0.3.1)
Requirement already satisfied: certifi>=2017.4.17 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from requests->folium) (2020.4.5.1)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from requests->folium) (1.25.7)
Requirement already satisfied: idna<2.9,>=2.5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from requests->folium) (2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from requests->folium) (3.0.4)
Requirement already satisfied: MarkupSafe>=0.23 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from jinja2>=2.9->folium) (1.1.1)
Requirement already satisfied: six in /srv/conda/envs/notebook/lib/python3.7/site-packages (from branca>=0.3.0->folium) (1.14.0)
Note: you may need to restart the kernel to use updated packages.
In [9]:
!pip install plotly --upgrade
!pip install cufflinks --upgrade
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already up-to-date: plotly in /srv/conda/envs/notebook/lib/python3.7/site-packages (4.6.0)
Requirement already satisfied, skipping upgrade: six in /srv/conda/envs/notebook/lib/python3.7/site-packages (from plotly) (1.14.0)
Requirement already satisfied, skipping upgrade: retrying>=1.3.3 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from plotly) (1.3.3)
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Requirement already up-to-date: cufflinks in /srv/conda/envs/notebook/lib/python3.7/site-packages (0.17.3)
Requirement already satisfied, skipping upgrade: colorlover>=0.2.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from cufflinks) (0.3.0)
Requirement already satisfied, skipping upgrade: ipython>=5.3.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from cufflinks) (7.11.1)
Requirement already satisfied, skipping upgrade: setuptools>=34.4.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from cufflinks) (45.1.0.post20200119)
Requirement already satisfied, skipping upgrade: numpy>=1.9.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from cufflinks) (1.18.1)
Requirement already satisfied, skipping upgrade: ipywidgets>=7.0.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from cufflinks) (7.5.1)
Requirement already satisfied, skipping upgrade: pandas>=0.19.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from cufflinks) (0.24.2)
Requirement already satisfied, skipping upgrade: plotly>=4.1.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from cufflinks) (4.6.0)
Requirement already satisfied, skipping upgrade: six>=1.9.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from cufflinks) (1.14.0)
Requirement already satisfied, skipping upgrade: traitlets>=4.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipython>=5.3.0->cufflinks) (4.3.3)
Requirement already satisfied, skipping upgrade: backcall in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipython>=5.3.0->cufflinks) (0.1.0)
Requirement already satisfied, skipping upgrade: decorator in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipython>=5.3.0->cufflinks) (4.4.1)
Requirement already satisfied, skipping upgrade: pexpect; sys_platform != "win32" in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipython>=5.3.0->cufflinks) (4.8.0)
Requirement already satisfied, skipping upgrade: jedi>=0.10 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipython>=5.3.0->cufflinks) (0.16.0)
Requirement already satisfied, skipping upgrade: pygments in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipython>=5.3.0->cufflinks) (2.5.2)
Requirement already satisfied, skipping upgrade: pickleshare in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipython>=5.3.0->cufflinks) (0.7.5)
Requirement already satisfied, skipping upgrade: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipython>=5.3.0->cufflinks) (3.0.3)
Requirement already satisfied, skipping upgrade: nbformat>=4.2.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipywidgets>=7.0.0->cufflinks) (5.0.4)
Requirement already satisfied, skipping upgrade: widgetsnbextension~=3.5.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipywidgets>=7.0.0->cufflinks) (3.5.1)
Requirement already satisfied, skipping upgrade: ipykernel>=4.5.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipywidgets>=7.0.0->cufflinks) (5.1.4)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.5.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from pandas>=0.19.2->cufflinks) (2.8.1)
Requirement already satisfied, skipping upgrade: pytz>=2011k in /srv/conda/envs/notebook/lib/python3.7/site-packages (from pandas>=0.19.2->cufflinks) (2019.3)
Requirement already satisfied, skipping upgrade: retrying>=1.3.3 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from plotly>=4.1.1->cufflinks) (1.3.3)
Requirement already satisfied, skipping upgrade: ipython-genutils in /srv/conda/envs/notebook/lib/python3.7/site-packages (from traitlets>=4.2->ipython>=5.3.0->cufflinks) (0.2.0)
Requirement already satisfied, skipping upgrade: ptyprocess>=0.5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from pexpect; sys_platform != "win32"->ipython>=5.3.0->cufflinks) (0.6.0)
Requirement already satisfied, skipping upgrade: parso>=0.5.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from jedi>=0.10->ipython>=5.3.0->cufflinks) (0.6.0)
Requirement already satisfied, skipping upgrade: wcwidth in /srv/conda/envs/notebook/lib/python3.7/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=5.3.0->cufflinks) (0.1.8)
Requirement already satisfied, skipping upgrade: jsonschema!=2.5.0,>=2.4 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from nbformat>=4.2.0->ipywidgets>=7.0.0->cufflinks) (3.2.0)
Requirement already satisfied, skipping upgrade: jupyter-core in /srv/conda/envs/notebook/lib/python3.7/site-packages (from nbformat>=4.2.0->ipywidgets>=7.0.0->cufflinks) (4.6.1)
Requirement already satisfied, skipping upgrade: notebook>=4.4.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (6.0.3)
Requirement already satisfied, skipping upgrade: tornado>=4.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.0.0->cufflinks) (6.0.3)
Requirement already satisfied, skipping upgrade: jupyter-client in /srv/conda/envs/notebook/lib/python3.7/site-packages (from ipykernel>=4.5.1->ipywidgets>=7.0.0->cufflinks) (5.3.4)
Requirement already satisfied, skipping upgrade: importlib-metadata; python_version < "3.8" in /srv/conda/envs/notebook/lib/python3.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.0.0->cufflinks) (1.5.0)
Requirement already satisfied, skipping upgrade: attrs>=17.4.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.0.0->cufflinks) (19.3.0)
Requirement already satisfied, skipping upgrade: pyrsistent>=0.14.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.0.0->cufflinks) (0.15.7)
Requirement already satisfied, skipping upgrade: terminado>=0.8.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (0.8.3)
Requirement already satisfied, skipping upgrade: jinja2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (2.11.0)
Requirement already satisfied, skipping upgrade: prometheus-client in /srv/conda/envs/notebook/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (0.7.1)
Requirement already satisfied, skipping upgrade: pyzmq>=17 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (18.1.1)
Requirement already satisfied, skipping upgrade: nbconvert in /srv/conda/envs/notebook/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (5.5.0)
Requirement already satisfied, skipping upgrade: Send2Trash in /srv/conda/envs/notebook/lib/python3.7/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (1.5.0)
Requirement already satisfied, skipping upgrade: zipp>=0.5 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets>=7.0.0->cufflinks) (2.1.0)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from jinja2->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (1.1.1)
Requirement already satisfied, skipping upgrade: entrypoints>=0.2.2 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (0.3)
Requirement already satisfied, skipping upgrade: testpath in /srv/conda/envs/notebook/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (0.4.4)
Requirement already satisfied, skipping upgrade: defusedxml in /srv/conda/envs/notebook/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (0.6.0)
Requirement already satisfied, skipping upgrade: pandocfilters>=1.4.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (1.4.2)
Requirement already satisfied, skipping upgrade: mistune>=0.8.1 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (0.8.4)
Requirement already satisfied, skipping upgrade: bleach in /srv/conda/envs/notebook/lib/python3.7/site-packages (from nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (3.1.0)
Requirement already satisfied, skipping upgrade: webencodings in /srv/conda/envs/notebook/lib/python3.7/site-packages (from bleach->nbconvert->notebook>=4.4.1->widgetsnbextension~=3.5.0->ipywidgets>=7.0.0->cufflinks) (0.5.1)
In [10]:
!pip install geopandas
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Collecting geopandas
  Downloading geopandas-0.7.0-py2.py3-none-any.whl (928 kB)
     |████████████████████████████████| 928 kB 3.5 MB/s eta 0:00:01
Collecting shapely
  Downloading Shapely-1.7.0-cp37-cp37m-manylinux1_x86_64.whl (1.8 MB)
     |████████████████████████████████| 1.8 MB 39.6 MB/s eta 0:00:01
Collecting fiona
  Downloading Fiona-1.8.13.post1-cp37-cp37m-manylinux1_x86_64.whl (14.7 MB)
     |████████████████████████████████| 14.7 MB 43.7 MB/s eta 0:00:01
Requirement already satisfied: pandas>=0.23.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from geopandas) (0.24.2)
Collecting pyproj>=2.2.0
  Downloading pyproj-2.6.1.post1-cp37-cp37m-manylinux2010_x86_64.whl (10.9 MB)
     |████████████████████████████████| 10.9 MB 18.1 MB/s eta 0:00:01
Requirement already satisfied: six>=1.7 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from fiona->geopandas) (1.14.0)
Requirement already satisfied: click<8,>=4.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from fiona->geopandas) (7.1.1)
Collecting cligj>=0.5
  Downloading cligj-0.5.0-py3-none-any.whl (5.7 kB)
Requirement already satisfied: attrs>=17 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from fiona->geopandas) (19.3.0)
Collecting munch
  Downloading munch-2.5.0-py2.py3-none-any.whl (10 kB)
Collecting click-plugins>=1.0
  Downloading click_plugins-1.1.1-py2.py3-none-any.whl (7.5 kB)
Requirement already satisfied: numpy>=1.12.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from pandas>=0.23.0->geopandas) (1.18.1)
Requirement already satisfied: pytz>=2011k in /srv/conda/envs/notebook/lib/python3.7/site-packages (from pandas>=0.23.0->geopandas) (2019.3)
Requirement already satisfied: python-dateutil>=2.5.0 in /srv/conda/envs/notebook/lib/python3.7/site-packages (from pandas>=0.23.0->geopandas) (2.8.1)
Installing collected packages: shapely, cligj, munch, click-plugins, fiona, pyproj, geopandas
Successfully installed click-plugins-1.1.1 cligj-0.5.0 fiona-1.8.13.post1 geopandas-0.7.0 munch-2.5.0 pyproj-2.6.1.post1 shapely-1.7.0
In [12]:
import pandas as pd
import matplotlib.pyplot as plt
from IPython.display import IFrame
IFrame("Kestrel.jpg", width=560, height=315)

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
In [1]:
import pandas as pd
import matplotlib.pyplot as plt
from IPython.display import IFrame
IFrame("kestrel-png-kestrel-248.png", width=560, height=315)
Out[1]:
In [2]:
from IPython.display import IFrame
IFrame("owl_PNG47.png", width=560, height=350)
Out[2]:

A Technical REPORT ON WILDLIFE BIRDS In The U.K and the impact's from environmental to criminal issues that have affected them

Name:Luca Aiello

In [15]:
df = pd.read_csv('farmlandbirds.csv')

importing data

In [24]:
df.head()
Out[24]:
Species Long term change (1986-2017) Annual percentage change Trend.1 Short term change (2012-2017) Annual percentage change.2 Trend.2
0 Arctic Skua (Stercorarius parasiticus) -82 -5.40 strong decline -15 -3.14 strong decline
1 Black-legged kittiwake (Rissa tridactyla) -57 -2.71 weak decline 9 1.79 weak increase
2 Common guillemot (Uria aalge) 37 1.01 little change 5 1.06 little change
3 European shag (Phalacrocorax artistotelis) -33 -1.29 weak decline -1 -0.25 little change
4 Great Black-backed Gull (Larus marinus) -15 -0.52 little change 33 5.80 strong increase
In [35]:
df = pd.read_csv('woodlandbirds.csv')
In [36]:
df = pd.read_csv('seabirds.csv')
In [37]:
df = pd.read_csv('wetlandbirds.csv')
In [38]:
import glob
In [39]:
from glob import glob
In [40]:
bird_files = sorted(glob('*birds*.csv'))
bird_files
Out[40]:
['farmlandbirds.csv', 'seabirds.csv', 'wetlandbirds.csv', 'woodlandbirds.csv']
In [41]:
all_bird_files = pd.concat((pd.read_csv(file).assign(filename=file) for file in bird_files), ignore_index=True)
sort=True
/srv/conda/envs/notebook/lib/python3.7/site-packages/ipykernel_launcher.py:1: FutureWarning: Sorting because non-concatenation axis is not aligned. A future version
of pandas will change to not sort by default.

To accept the future behavior, pass 'sort=False'.

To retain the current behavior and silence the warning, pass 'sort=True'.

  """Entry point for launching an IPython kernel.
In [42]:
sort=True
In [43]:
all_bird_files.shape
Out[43]:
(95, 10)
In [44]:
df.head()
Out[44]:
Species Long term change (1975-2017) Annual percentage change Trend.1 Short term change (2012-2017) Annual percentage change.2 Trend.2
0 Common Sandpiper (Actitis hypoleucos) -48.0 -1.56 weak decline -5 -1.00 little change
1 Dipper (Cinclus cinclus) -21.0 -0.55 little change 13 2.42 weak increase
2 Goosander (Mergus merganser) 148.0 2.55 weak increase 30 5.34 strong increase
3 Grey Wagtail (Motacilla cinerea) -40.0 -1.19 weak decline 40 6.95 strong increase
4 Cetti's Warbler (Cettia cetti) 693.0 7.68 strong increase 47 8.01 strong increase
In [45]:
df.describe(include = 'all')
Out[45]:
Species Long term change (1975-2017) Annual percentage change Trend.1 Short term change (2012-2017) Annual percentage change.2 Trend.2
count 26 25.000000 25.000000 25 26.000000 26.000000 26
unique 26 NaN NaN 5 NaN NaN 5
top Redshank (Tringa totanus) NaN NaN little change NaN NaN strong increase
freq 1 NaN NaN 9 NaN NaN 8
mean NaN 34.440000 -0.158800 NaN 5.346154 0.671538 NaN
std NaN 155.662048 2.820411 NaN 22.586620 4.266721 NaN
min NaN -97.000000 -8.150000 NaN -35.000000 -8.250000 NaN
25% NaN -48.000000 -1.560000 NaN -7.750000 -1.680000 NaN
50% NaN -19.000000 -0.550000 NaN -1.500000 -0.235000 NaN
75% NaN 64.000000 1.390000 NaN 18.750000 3.427500 NaN
max NaN 693.000000 7.680000 NaN 53.000000 8.910000 NaN
In [46]:
df.dropna
Out[46]:
<bound method DataFrame.dropna of                                        Species  Long term change (1975-2017)  \
0        Common Sandpiper (Actitis hypoleucos)                         -48.0   
1                     Dipper (Cinclus cinclus)                         -21.0   
2                 Goosander (Mergus merganser)                         148.0   
3             Grey Wagtail (Motacilla cinerea)                         -40.0   
4               Cetti's Warbler (Cettia cetti)                         693.0   
5          Reed Bunting (Emberiza schoeniclus)                         -67.0   
6       Reed Warbler (Acrocephalus scirpaceus)                          86.0   
7   Sedge Warbler (Acrocephalus schoenobaenus)                         -49.0   
8                           Coot (Fulica atra)                          53.0   
9     Great Crested Grebe (Podiceps cristatus)                         -14.0   
10       Little Grebe (Tachybaptus ruficollis)                         -24.0   
11                Mallard (Anas platyrhynchos)                         198.0   
12               Moorhen (Gallinula chloropus)                         -33.0   
13               Tufted Duck (Aythya fuligula)                          79.0   
14                   Curlew (Numenius arquata)                         -19.0   
15                 Lapwing (Vanellus vanellus)                         -56.0   
16             Little Egret (Egretta garzetta)                           NaN   
17                     Mute Swan (Cygnus olor)                          93.0   
18                   Redshank (Tringa totanus)                         -60.0   
19                 Snipe (Gallinago gallinago)                         -79.0   
20                          Teal (Anas crecca)                          55.0   
21            Yellow Wagtail (Motacilla flava)                         -97.0   
22                  Grey Heron (Ardea cinerea)                         -16.0   
23                  Kingfisher (Alcedo atthis)                         -19.0   
24       Oystercatcher (Haematopus ostralegus)                          64.0   
25               Sand Martin (Riparia riparia)                          34.0   

    Annual percentage change          Trend.1  Short term change (2012-2017)  \
0                      -1.56     weak decline                             -5   
1                      -0.55    little change                             13   
2                       2.55    weak increase                             30   
3                      -1.19     weak decline                             40   
4                       7.68  strong increase                             47   
5                      -2.61     weak decline                            -12   
6                       1.74    weak increase                              0   
7                      -1.61     weak decline                            -26   
8                       1.01    little change                            -19   
9                      -0.66    little change                            -12   
10                     -0.66    little change                             19   
11                      2.63    weak increase                             -7   
12                     -0.95    little change                             -3   
13                      1.39    weak increase                            -12   
14                     -0.58    little change                             -2   
15                     -2.22     weak decline                             -8   
16                       NaN              NaN                             53   
17                      1.58    weak increase                              3   
18                     -2.15     weak decline                             -4   
19                     -3.61   strong decline                             36   
20                      2.00    weak increase                             30   
21                     -8.15   strong decline                            -35   
22                      1.19    little change                             -1   
23                      0.76    little change                              3   
24                      0.00    weak increase                             -7   
25                      0.00    little change                             18   

    Annual percentage change.2          Trend.2  
0                        -1.00    little change  
1                         2.42    weak increase  
2                         5.34  strong increase  
3                         6.95  strong increase  
4                         8.01  strong increase  
5                        -2.51     weak decline  
6                         0.04    little change  
7                        -5.92   strong decline  
8                        -4.20   strong decline  
9                        -2.50     weak decline  
10                        3.47  strong increase  
11                       -1.35     weak decline  
12                       -0.57    little change  
13                       -2.43     weak decline  
14                       -0.47    little change  
15                       -1.76     weak decline  
16                        8.91  strong increase  
17                        0.60    little change  
18                       -0.88    little change  
19                        6.28  strong increase  
20                        5.42  strong increase  
21                       -8.25   strong decline  
22                       -1.44    little change  
23                        3.30    little change  
24                        0.00     weak decline  
25                        0.00  strong increase  >
In [47]:
df.count()
Out[47]:
Species                          26
Long term change (1975-2017)     25
Annual percentage change         25
Trend.1                          25
Short term change (2012-2017)    26
Annual percentage change.2       26
Trend.2                          26
dtype: int64
In [48]:
df.any()
Out[48]:
Species                          True
Long term change (1975-2017)     True
Annual percentage change         True
Trend.1                          True
Short term change (2012-2017)    True
Annual percentage change.2       True
Trend.2                          True
dtype: bool
In [49]:
df.all(axis=1)
Out[49]:
0      True
1      True
2      True
3      True
4      True
5      True
6     False
7      True
8      True
9      True
10     True
11     True
12     True
13     True
14     True
15     True
16     True
17     True
18     True
19     True
20     True
21     True
22     True
23     True
24    False
25    False
dtype: bool
In [50]:
df.corr(method='spearman')
Out[50]:
Long term change (1975-2017) Annual percentage change Short term change (2012-2017) Annual percentage change.2
Long term change (1975-2017) 1.000000 0.962094 0.262519 0.298961
Annual percentage change 0.962094 1.000000 0.351955 0.360977
Short term change (2012-2017) 0.262519 0.351955 1.000000 0.964910
Annual percentage change.2 0.298961 0.360977 0.964910 1.000000
In [51]:
df.cov()
Out[51]:
Long term change (1975-2017) Annual percentage change Short term change (2012-2017) Annual percentage change.2
Long term change (1975-2017) 24230.673333 361.576950 1428.881667 262.290750
Annual percentage change 361.576950 7.954719 27.914033 5.689747
Short term change (2012-2017) 1428.881667 27.914033 510.155385 93.568646
Annual percentage change.2 262.290750 5.689747 93.568646 18.204910
In [52]:
df.sum()
Out[52]:
Species                          Common Sandpiper (Actitis hypoleucos)Dipper (C...
Long term change (1975-2017)                                                   861
Annual percentage change                                                     -3.97
Short term change (2012-2017)                                                  139
Annual percentage change.2                                                   17.46
Trend.2                          little changeweak increasestrong increasestron...
dtype: object
In [53]:
df.groupby('Short term change (2012-2017)')
Out[53]:
<pandas.core.groupby.generic.DataFrameGroupBy object at 0x7f75f9511350>
In [54]:
df.Species.head()
Out[54]:
0    Common Sandpiper (Actitis hypoleucos)
1                 Dipper (Cinclus cinclus)
2             Goosander (Mergus merganser)
3         Grey Wagtail (Motacilla cinerea)
4           Cetti's Warbler (Cettia cetti)
Name: Species, dtype: object
In [55]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
In [56]:
fig, ax = plt.subplots(figsize=(100,100))
sns.lineplot(x='Species', y='Short term change (2012-2017)', ax=ax, data=df).set_title('birds changes over set years')
Out[56]:
Text(0.5, 1.0, 'birds changes over set years')
In [57]:
fig, ax = plt.subplots(figsize=(100,100))
sns.lineplot(x='Species', y='Annual percentage change', ax=ax, data=df).set_title('birds changes over set years')
Out[57]:
Text(0.5, 1.0, 'birds changes over set years')
In [58]:
#importing Pandas 
import pandas as pd
#importing plotly and cufflinks in offline mode
import cufflinks as cf
import plotly.offline
cf.go_offline()
cf.set_config_file(offline=False, world_readable=True)
In [59]:
df.iplot(kind="scatter", theme="white",x="Long term change (1975-2017)",y="Annual percentage change",
            categories="Species")
In [60]:
df[['Short term change (2012-2017)', 'Species']].pivot(columns='Short term change (2012-2017)', values='Species').iplot(kind='box')
In [61]:
df.loc[df['Annual percentage change'] != 'Annual percentage change.1'].tail().mean()
/srv/conda/envs/notebook/lib/python3.7/site-packages/pandas/core/ops.py:1649: FutureWarning:

elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison

Out[61]:
Long term change (1975-2017)    -6.800
Annual percentage change        -1.240
Short term change (2012-2017)   -4.400
Annual percentage change.2      -1.278
dtype: float64
In [62]:
df.std(axis = 0, skipna = True)
Out[62]:
Long term change (1975-2017)     155.662048
Annual percentage change           2.820411
Short term change (2012-2017)     22.586620
Annual percentage change.2         4.266721
dtype: float64
In [63]:
df.head()
Out[63]:
Species Long term change (1975-2017) Annual percentage change Trend.1 Short term change (2012-2017) Annual percentage change.2 Trend.2
0 Common Sandpiper (Actitis hypoleucos) -48.0 -1.56 weak decline -5 -1.00 little change
1 Dipper (Cinclus cinclus) -21.0 -0.55 little change 13 2.42 weak increase
2 Goosander (Mergus merganser) 148.0 2.55 weak increase 30 5.34 strong increase
3 Grey Wagtail (Motacilla cinerea) -40.0 -1.19 weak decline 40 6.95 strong increase
4 Cetti's Warbler (Cettia cetti) 693.0 7.68 strong increase 47 8.01 strong increase
In [64]:
df.dropna()
Out[64]:
Species Long term change (1975-2017) Annual percentage change Trend.1 Short term change (2012-2017) Annual percentage change.2 Trend.2
0 Common Sandpiper (Actitis hypoleucos) -48.0 -1.56 weak decline -5 -1.00 little change
1 Dipper (Cinclus cinclus) -21.0 -0.55 little change 13 2.42 weak increase
2 Goosander (Mergus merganser) 148.0 2.55 weak increase 30 5.34 strong increase
3 Grey Wagtail (Motacilla cinerea) -40.0 -1.19 weak decline 40 6.95 strong increase
4 Cetti's Warbler (Cettia cetti) 693.0 7.68 strong increase 47 8.01 strong increase
5 Reed Bunting (Emberiza schoeniclus) -67.0 -2.61 weak decline -12 -2.51 weak decline
6 Reed Warbler (Acrocephalus scirpaceus) 86.0 1.74 weak increase 0 0.04 little change
7 Sedge Warbler (Acrocephalus schoenobaenus) -49.0 -1.61 weak decline -26 -5.92 strong decline
8 Coot (Fulica atra) 53.0 1.01 little change -19 -4.20 strong decline
9 Great Crested Grebe (Podiceps cristatus) -14.0 -0.66 little change -12 -2.50 weak decline
10 Little Grebe (Tachybaptus ruficollis) -24.0 -0.66 little change 19 3.47 strong increase
11 Mallard (Anas platyrhynchos) 198.0 2.63 weak increase -7 -1.35 weak decline
12 Moorhen (Gallinula chloropus) -33.0 -0.95 little change -3 -0.57 little change
13 Tufted Duck (Aythya fuligula) 79.0 1.39 weak increase -12 -2.43 weak decline
14 Curlew (Numenius arquata) -19.0 -0.58 little change -2 -0.47 little change
15 Lapwing (Vanellus vanellus) -56.0 -2.22 weak decline -8 -1.76 weak decline
17 Mute Swan (Cygnus olor) 93.0 1.58 weak increase 3 0.60 little change
18 Redshank (Tringa totanus) -60.0 -2.15 weak decline -4 -0.88 little change
19 Snipe (Gallinago gallinago) -79.0 -3.61 strong decline 36 6.28 strong increase
20 Teal (Anas crecca) 55.0 2.00 weak increase 30 5.42 strong increase
21 Yellow Wagtail (Motacilla flava) -97.0 -8.15 strong decline -35 -8.25 strong decline
22 Grey Heron (Ardea cinerea) -16.0 1.19 little change -1 -1.44 little change
23 Kingfisher (Alcedo atthis) -19.0 0.76 little change 3 3.30 little change
24 Oystercatcher (Haematopus ostralegus) 64.0 0.00 weak increase -7 0.00 weak decline
25 Sand Martin (Riparia riparia) 34.0 0.00 little change 18 0.00 strong increase
In [65]:
df.loc[df['Annual percentage change'] == df['Annual percentage change'].max()]
Out[65]:
Species Long term change (1975-2017) Annual percentage change Trend.1 Short term change (2012-2017) Annual percentage change.2 Trend.2
4 Cetti's Warbler (Cettia cetti) 693.0 7.68 strong increase 47 8.01 strong increase
In [66]:
df.loc[df['Annual percentage change'] == df['Annual percentage change'].min()]
Out[66]:
Species Long term change (1975-2017) Annual percentage change Trend.1 Short term change (2012-2017) Annual percentage change.2 Trend.2
21 Yellow Wagtail (Motacilla flava) -97.0 -8.15 strong decline -35 -8.25 strong decline
In [67]:
df.plot(kind='bar', x='Long term change (1975-2017)', y='Annual percentage change')
Out[67]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f75f9712250>
In [68]:
df.plot(kind='bar', x='Short term change (2012-2017)', y='Annual percentage change.2')
Out[68]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f75f92e6890>
In [69]:
df1 = df
In [70]:
df1_popTI = df1.pop('Long term change (1975-2017)')
df1_popTI
Out[70]:
0     -48.0
1     -21.0
2     148.0
3     -40.0
4     693.0
5     -67.0
6      86.0
7     -49.0
8      53.0
9     -14.0
10    -24.0
11    198.0
12    -33.0
13     79.0
14    -19.0
15    -56.0
16      NaN
17     93.0
18    -60.0
19    -79.0
20     55.0
21    -97.0
22    -16.0
23    -19.0
24     64.0
25     34.0
Name: Long term change (1975-2017), dtype: float64
In [71]:
df.loc[df['Trend.1'] == 'Trend.1']
Out[71]:
Species Annual percentage change Trend.1 Short term change (2012-2017) Annual percentage change.2 Trend.2
In [72]:
df2 = df
In [73]:
df2_popTI = df2.pop('Trend.1')
df2_popTI
Out[73]:
0        weak decline
1       little change
2       weak increase
3        weak decline
4     strong increase
5        weak decline
6       weak increase
7        weak decline
8       little change
9       little change
10      little change
11      weak increase
12      little change
13      weak increase
14      little change
15       weak decline
16                NaN
17      weak increase
18       weak decline
19     strong decline
20      weak increase
21     strong decline
22      little change
23      little change
24      weak increase
25      little change
Name: Trend.1, dtype: object
In [74]:
df3 = df
In [75]:
df3_popTI = df3.pop('Annual percentage change')
df3_popTI
Out[75]:
0    -1.56
1    -0.55
2     2.55
3    -1.19
4     7.68
5    -2.61
6     1.74
7    -1.61
8     1.01
9    -0.66
10   -0.66
11    2.63
12   -0.95
13    1.39
14   -0.58
15   -2.22
16     NaN
17    1.58
18   -2.15
19   -3.61
20    2.00
21   -8.15
22    1.19
23    0.76
24    0.00
25    0.00
Name: Annual percentage change, dtype: float64
In [76]:
df.head()
Out[76]:
Species Short term change (2012-2017) Annual percentage change.2 Trend.2
0 Common Sandpiper (Actitis hypoleucos) -5 -1.00 little change
1 Dipper (Cinclus cinclus) 13 2.42 weak increase
2 Goosander (Mergus merganser) 30 5.34 strong increase
3 Grey Wagtail (Motacilla cinerea) 40 6.95 strong increase
4 Cetti's Warbler (Cettia cetti) 47 8.01 strong increase
In [77]:
df['Species'].unique()
Out[77]:
array(['Common Sandpiper (Actitis hypoleucos)',
       'Dipper (Cinclus cinclus)', 'Goosander (Mergus merganser)',
       'Grey Wagtail (Motacilla cinerea)',
       "Cetti's Warbler (Cettia cetti)",
       'Reed Bunting (Emberiza schoeniclus)',
       'Reed Warbler (Acrocephalus scirpaceus)',
       'Sedge Warbler (Acrocephalus schoenobaenus)', 'Coot (Fulica atra)',
       'Great Crested Grebe (Podiceps cristatus)',
       'Little Grebe (Tachybaptus ruficollis)',
       'Mallard (Anas platyrhynchos)', 'Moorhen (Gallinula chloropus)',
       'Tufted Duck (Aythya fuligula)', 'Curlew (Numenius arquata)',
       'Lapwing (Vanellus vanellus)', 'Little Egret (Egretta garzetta)',
       'Mute Swan (Cygnus olor)', 'Redshank (Tringa totanus)',
       'Snipe (Gallinago gallinago)', 'Teal (Anas crecca)',
       'Yellow Wagtail (Motacilla flava)', 'Grey Heron (Ardea cinerea)',
       'Kingfisher (Alcedo atthis)',
       'Oystercatcher (Haematopus ostralegus)',
       'Sand Martin (Riparia riparia)'], dtype=object)
In [78]:
df_Species_ = df[(df['Species'] == 'Common Sandpiper (Actitis hypoleucos)') | (df['Species'] == 'Dipper (Cinclus cinclus)') | (df['Species'] == 'Goosander (Mergus merganser)') | (df['Species'] == 'Grey Wagtail (Motacilla cinerea)') |(df['Species'] == 'Reed Bunting (Emberiza schoeniclus)')|(df['Species'] == 'Sedge Warbler (Acrocephalus schoenobaenus)')|(df['Species'] == 'Coot (Fulica atra)')|(df['Species'] == 'Great Crested Grebe (Podiceps cristatus)')|(df['Species'] == 'Little Grebe (Tachybaptus ruficollis)')|(df['Species'] == 'Mallard (Anas platyrhynchos)') |(df['Species'] == 'Moorhen (Gallinula chloropus)') |(df['Species'] == 'Tufted Duck (Aythya fuligula)') |(df['Species'] == 'Curlew (Numenius arquata)')|(df['Species'] == 'Lapwing (Vanellus vanellus)') |(df['Species'] == 'Little Egret (Egretta garzetta)') |(df['Species'] == 'Mute Swan (Cygnus olor)') |(df['Species'] == 'Redshank (Tringa totanus)') |(df['Species'] == 'Snipe (Gallinago gallinago)') |(df['Species'] == 'Teal (Anas crecca)') |(df['Species'] == 'Yellow Wagtail (Motacilla flava)') |(df['Species'] == 'Grey Heron (Ardea cinerea)')|(df['Species'] == 'Kingfisher (Alcedo atthis)')|(df['Species'] == 'Oystercatcher (Haematopus ostralegus)')|(df['Species'] == 'Sand Martin (Riparia riparia)')]
In [79]:
df_Species_.shape
Out[79]:
(24, 4)
In [80]:
sns.barplot(x='Species', y='Short term change (2012-2017)', data=df,).set_title ("change of bird species 2012-2017")


sns.despine()
sns.set(rc={'figure.figsize':(100.100,100.100)})
ax = sns.countplot(x="Species", data=df)

ax.set_xticklabels(ax.get_xticklabels(), rotation=40, ha="right") 

ax.set_xticklabels(ax.get_xticklabels(), fontsize=10)
plt.show()
In [82]:
sns.lmplot('Annual percentage change.2', 'Short term change (2012-2017)', data=df, fit_reg=False, height=3,aspect=2)
sns.despine()
sns.set(rc={'figure.figsize':(.20,20.20)})
ax = sns.lmplot(x="Annual percentage change.2", data=df)
ax = sns.lmplot(y="Short term change (2012-2017)", data=df)


plt.show()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-82-9e1859852353> in <module>
      2 sns.despine()
      3 sns.set(rc={'figure.figsize':(.20,20.20)})
----> 4 ax = sns.lmplot(x="Annual percentage change.2", data=df)
      5 ax = sns.lmplot(y="Short term change (2012-2017)", data=df)
      6 

TypeError: lmplot() missing 1 required positional argument: 'y'
In [83]:
sns.jointplot(x= 'Short term change (2012-2017)', y= 'Annual percentage change.2', data=df, height=5)
Out[83]:
<seaborn.axisgrid.JointGrid at 0x7f75ccf5f850>
In [84]:
df['Trend.2'].unique()
Out[84]:
array(['little change', 'weak increase', 'strong increase',
       'weak decline', 'strong decline'], dtype=object)
In [85]:
df_Trend_2 = df[(df['Trend.2'] == 'little change') | (df['Trend.2'] == 'weak increase') | (df['Trend.2'] == 'strong increase') | (df['Trend.2'] == 'weak decline') | (df['Trend.2'] == 'strong decline')]
In [86]:
df_Trend_2['Trend.2'].unique()
Out[86]:
array(['little change', 'weak increase', 'strong increase',
       'weak decline', 'strong decline'], dtype=object)
In [87]:
df_Trend_2.shape
Out[87]:
(26, 4)
In [88]:
df.groupby('Species')[['Trend.2']].sum()
Out[88]:
Trend.2
Species
Cetti's Warbler (Cettia cetti) strong increase
Common Sandpiper (Actitis hypoleucos) little change
Coot (Fulica atra) strong decline
Curlew (Numenius arquata) little change
Dipper (Cinclus cinclus) weak increase
Goosander (Mergus merganser) strong increase
Great Crested Grebe (Podiceps cristatus) weak decline
Grey Heron (Ardea cinerea) little change
Grey Wagtail (Motacilla cinerea) strong increase
Kingfisher (Alcedo atthis) little change
Lapwing (Vanellus vanellus) weak decline
Little Egret (Egretta garzetta) strong increase
Little Grebe (Tachybaptus ruficollis) strong increase
Mallard (Anas platyrhynchos) weak decline
Moorhen (Gallinula chloropus) little change
Mute Swan (Cygnus olor) little change
Oystercatcher (Haematopus ostralegus) weak decline
Redshank (Tringa totanus) little change
Reed Bunting (Emberiza schoeniclus) weak decline
Reed Warbler (Acrocephalus scirpaceus) little change
Sand Martin (Riparia riparia) strong increase
Sedge Warbler (Acrocephalus schoenobaenus) strong decline
Snipe (Gallinago gallinago) strong increase
Teal (Anas crecca) strong increase
Tufted Duck (Aythya fuligula) weak decline
Yellow Wagtail (Motacilla flava) strong decline
In [89]:
fig, ax = plt.subplots(figsize=(20,8))
sns.countplot( x='Trend.2', data=df, ax=ax).set_title('Types of trends')
Out[89]:
Text(0.5, 1.0, 'Types of trends')
In [90]:
sns.pairplot(df, height=5)
Out[90]:
<seaborn.axisgrid.PairGrid at 0x7f75ce172a50>
In [91]:
df = pd.read_csv('prosecutionfalcos.csv') 
In [92]:
df.head()
Out[92]:
Year App. Taxon Class Order Family Genus Importer Exporter Origin Importer reported quantity Exporter reported quantity Term Unit Purpose Source
0 2016 I Branta sandvicensis Aves Anseriformes Anatidae Branta CN GB NaN 1.0 NaN bodies NaN Q C
1 2016 I Falco hybrid Aves Falconiformes Falconidae Falco AE GB ES 1.0 NaN live NaN P C
2 2016 I Falco hybrid Aves Falconiformes Falconidae Falco AE GB NaN 1080.0 14.0 live NaN P C
3 2016 I Falco hybrid Aves Falconiformes Falconidae Falco AE GB NaN 273.0 NaN live NaN P D
4 2016 I Falco hybrid Aves Falconiformes Falconidae Falco AE GB NaN 35.0 995.0 live NaN T C
In [93]:
df.dropna 
Out[93]:
<bound method DataFrame.dropna of      Year App.                        Taxon      Class           Order  \
0    2016    I          Branta sandvicensis       Aves    Anseriformes   
1    2016    I                 Falco hybrid       Aves   Falconiformes   
2    2016    I                 Falco hybrid       Aves   Falconiformes   
3    2016    I                 Falco hybrid       Aves   Falconiformes   
4    2016    I                 Falco hybrid       Aves   Falconiformes   
5    2016    I                 Falco hybrid       Aves   Falconiformes   
6    2016    I                 Falco hybrid       Aves   Falconiformes   
7    2016    I                 Falco hybrid       Aves   Falconiformes   
8    2016    I                 Falco hybrid       Aves   Falconiformes   
9    2016    I                 Falco hybrid       Aves   Falconiformes   
10   2016    I                 Falco hybrid       Aves   Falconiformes   
11   2016    I                 Falco hybrid       Aves   Falconiformes   
12   2016    I                 Falco hybrid       Aves   Falconiformes   
13   2016    I          Falco pelegrinoides       Aves   Falconiformes   
14   2016    I             Falco peregrinus       Aves   Falconiformes   
15   2016    I             Falco peregrinus       Aves   Falconiformes   
16   2016    I             Falco peregrinus       Aves   Falconiformes   
17   2016    I             Falco peregrinus       Aves   Falconiformes   
18   2016    I             Falco peregrinus       Aves   Falconiformes   
19   2016    I             Falco peregrinus       Aves   Falconiformes   
20   2016    I             Falco peregrinus       Aves   Falconiformes   
21   2016    I             Falco peregrinus       Aves   Falconiformes   
22   2016    I             Falco peregrinus       Aves   Falconiformes   
23   2016    I             Falco peregrinus       Aves   Falconiformes   
24   2016    I             Falco peregrinus       Aves   Falconiformes   
25   2016    I             Falco peregrinus       Aves   Falconiformes   
26   2016    I             Falco peregrinus       Aves   Falconiformes   
27   2016    I             Falco peregrinus       Aves   Falconiformes   
28   2016    I             Falco peregrinus       Aves   Falconiformes   
29   2016    I             Falco peregrinus       Aves   Falconiformes   
..    ...  ...                          ...        ...             ...   
159  2016   II                  Strix aluco       Aves    Strigiformes   
160  2016   II             Strix chacoensis       Aves    Strigiformes   
161  2016   II          Strix leptogrammica       Aves    Strigiformes   
162  2016   II               Strix nebulosa       Aves    Strigiformes   
163  2016   II               Strix nebulosa       Aves    Strigiformes   
164  2016   II                Strix rufipes       Aves    Strigiformes   
165  2016   II              Strix uralensis       Aves    Strigiformes   
166  2016   II                Strix virgata       Aves    Strigiformes   
167  2016   II             Strix woodfordii       Aves    Strigiformes   
168  2016   II                 Surnia ulula       Aves    Strigiformes   
169  2016   II           Brachypelma smithi  Arachnida         Araneae   
170  2016   II             Amazilia tzacatl       Aves     Apodiformes   
171  2016   II   Campylopterus hemileucurus       Aves     Apodiformes   
172  2016   II          Campylopterus rufus       Aves     Apodiformes   
173  2016   II       Chrysolampis mosquitus       Aves     Apodiformes   
174  2016   II          Florisuga mellivora       Aves     Apodiformes   
175  2016   II  Heliangelus amethysticollis       Aves     Apodiformes   
176  2016   II     Phaethornis longirostris       Aves     Apodiformes   
177  2016   II            Selasphorus rufus       Aves     Apodiformes   
178  2016   II                    Tyto alba       Aves    Strigiformes   
179  2016   II                    Tyto alba       Aves    Strigiformes   
180  2016   II                Tyto glaucops       Aves    Strigiformes   
181  2016   II          Psittaciformes spp.       Aves  Psittaciformes   
182  2016  III               Pavo cristatus       Aves     Galliformes   
183  2016  III               Pavo cristatus       Aves     Galliformes   
184  2016  III               Pavo cristatus       Aves     Galliformes   
185  2016  III               Pavo cristatus       Aves     Galliformes   
186  2016  III               Pavo cristatus       Aves     Galliformes   
187  2016  III               Pavo cristatus       Aves     Galliformes   
188  2016  III               Pavo cristatus       Aves     Galliformes   

            Family          Genus Importer Exporter Origin  \
0         Anatidae         Branta       CN       GB    NaN   
1       Falconidae          Falco       AE       GB     ES   
2       Falconidae          Falco       AE       GB    NaN   
3       Falconidae          Falco       AE       GB    NaN   
4       Falconidae          Falco       AE       GB    NaN   
5       Falconidae          Falco       AE       GB    NaN   
6       Falconidae          Falco       AE       GB    NaN   
7       Falconidae          Falco       BH       GB    NaN   
8       Falconidae          Falco       JP       GB    NaN   
9       Falconidae          Falco       JP       GB    NaN   
10      Falconidae          Falco       KW       GB    NaN   
11      Falconidae          Falco       KW       GB    NaN   
12      Falconidae          Falco       QA       GB    NaN   
13      Falconidae          Falco       JP       GB    NaN   
14      Falconidae          Falco       AE       GB     AT   
15      Falconidae          Falco       AE       GB     CZ   
16      Falconidae          Falco       AE       GB     CZ   
17      Falconidae          Falco       AE       GB     DE   
18      Falconidae          Falco       AE       GB     DE   
19      Falconidae          Falco       AE       GB     IE   
20      Falconidae          Falco       AE       GB     NL   
21      Falconidae          Falco       AE       GB     NL   
22      Falconidae          Falco       AE       GB    NaN   
23      Falconidae          Falco       AE       GB    NaN   
24      Falconidae          Falco       JE       GB    NaN   
25      Falconidae          Falco       JP       GB    NaN   
26      Falconidae          Falco       JP       GB    NaN   
27      Falconidae          Falco       QA       GB     DE   
28      Falconidae          Falco       QA       GB    NaN   
29      Falconidae          Falco       QA       GB    NaN   
..             ...            ...      ...      ...    ...   
159      Strigidae          Strix       JP       GB    NaN   
160      Strigidae          Strix       JP       GB    NaN   
161      Strigidae          Strix       JP       GB    NaN   
162      Strigidae          Strix       JP       GB    NaN   
163      Strigidae          Strix       KW       GB    NaN   
164      Strigidae          Strix       JP       GB    NaN   
165      Strigidae          Strix       JP       GB    NaN   
166      Strigidae          Strix       JP       GB    NaN   
167      Strigidae          Strix       JP       GB    NaN   
168      Strigidae         Surnia       JP       GB    NaN   
169  Theraphosidae    Brachypelma       GG       GB    NaN   
170    Trochilidae       Amazilia       US       GB     XX   
171    Trochilidae  Campylopterus       US       GB     XX   
172    Trochilidae  Campylopterus       US       GB     XX   
173    Trochilidae   Chrysolampis       US       GB     XX   
174    Trochilidae      Florisuga       US       GB     XX   
175    Trochilidae    Heliangelus       US       GB     XX   
176    Trochilidae    Phaethornis       US       GB     XX   
177    Trochilidae    Selasphorus       US       GB     XX   
178      Tytonidae           Tyto       JP       GB    NaN   
179      Tytonidae           Tyto       KW       GB    NaN   
180      Tytonidae           Tyto       JP       GB    NaN   
181            NaN            NaN       US       GB     XX   
182    Phasianidae           Pavo       CH       GB     IN   
183    Phasianidae           Pavo       KE       GB    NaN   
184    Phasianidae           Pavo       KE       GB    NaN   
185    Phasianidae           Pavo       US       GB     CN   
186    Phasianidae           Pavo       US       GB     CN   
187    Phasianidae           Pavo       US       GB     XX   
188    Phasianidae           Pavo       US       GB    NaN   

     Importer reported quantity  Exporter reported quantity      Term Unit  \
0                           1.0                         NaN    bodies  NaN   
1                           1.0                         NaN      live  NaN   
2                        1080.0                        14.0      live  NaN   
3                         273.0                         NaN      live  NaN   
4                          35.0                       995.0      live  NaN   
5                          15.0                       265.0      live  NaN   
6                           4.0                         NaN      live  NaN   
7                           NaN                        49.0      live  NaN   
8                           NaN                         5.0      live  NaN   
9                           NaN                        10.0      live  NaN   
10                          NaN                        12.0      live  NaN   
11                          NaN                        19.0      live  NaN   
12                          8.0                         8.0      live  NaN   
13                          2.0                         2.0      live  NaN   
14                          NaN                         1.0      live  NaN   
15                          1.0                         NaN      live  NaN   
16                          NaN                         4.0      live  NaN   
17                          2.0                         NaN      live  NaN   
18                          NaN                         4.0      live  NaN   
19                          NaN                         3.0      live  NaN   
20                          1.0                         NaN      live  NaN   
21                          NaN                         1.0      live  NaN   
22                        118.0                         1.0      live  NaN   
23                          NaN                       116.0      live  NaN   
24                          1.0                         NaN      live  NaN   
25                          3.0                         NaN      live  NaN   
26                          5.0                         5.0      live  NaN   
27                          1.0                         2.0      live  NaN   
28                         25.0                        27.0      live  NaN   
29                         10.0                         8.0      live  NaN   
..                          ...                         ...       ...  ...   
159                        31.0                        27.0      live  NaN   
160                         1.0                         NaN      live  NaN   
161                         6.0                         4.0      live  NaN   
162                        18.0                        16.0      live  NaN   
163                         NaN                         2.0      live  NaN   
164                         6.0                         2.0      live  NaN   
165                        10.0                        10.0      live  NaN   
166                        12.0                         7.0      live  NaN   
167                         3.0                         1.0      live  NaN   
168                        13.0                         8.0      live  NaN   
169                         1.0                         NaN      live  NaN   
170                         1.0                         NaN  feathers  NaN   
171                         1.0                         NaN  feathers  NaN   
172                         1.0                         NaN  feathers  NaN   
173                         1.0                         NaN    bodies  NaN   
174                         1.0                         NaN  feathers  NaN   
175                         1.0                         NaN    bodies  NaN   
176                         1.0                         NaN  feathers  NaN   
177                         1.0                         NaN  feathers  NaN   
178                        27.0                        20.0      live  NaN   
179                         NaN                         5.0      live  NaN   
180                         4.0                         4.0      live  NaN   
181                         1.0                         NaN  feathers  NaN   
182                         NaN                         1.0  feathers  NaN   
183                        20.0                         NaN  feathers   kg   
184                      2500.0                         NaN  feathers  NaN   
185                         NaN                       500.0  feathers   kg   
186                      3830.0                       150.0  feathers  NaN   
187                         1.0                         NaN    bodies  NaN   
188                         1.0                         NaN    bodies  NaN   

    Purpose Source  
0         Q      C  
1         P      C  
2         P      C  
3         P      D  
4         T      C  
5         T      D  
6       NaN      C  
7         T      C  
8         T      C  
9         T      D  
10        T      C  
11        T      D  
12        T      C  
13        T      D  
14        T      C  
15        P      C  
16        T      C  
17        P      C  
18        T      C  
19        T      C  
20        P      C  
21        T      C  
22        P      C  
23        T      C  
24        T      C  
25        T      C  
26        T      D  
27        T      C  
28        T      C  
29        T      D  
..      ...    ...  
159       T      C  
160       T      C  
161       T      C  
162       T      C  
163       T      C  
164       T      C  
165       T      C  
166       T      C  
167       T      C  
168       T      C  
169       T      F  
170       T      O  
171       T      O  
172       T      O  
173       T      O  
174       T      O  
175       T      O  
176       T      O  
177       T      O  
178       T      C  
179       T      C  
180       T      C  
181       T      I  
182       T      W  
183       T      C  
184       T      C  
185       T      O  
186       T      O  
187       Q      O  
188       T      C  

[189 rows x 16 columns]>
In [94]:
df.drop(['App.', 'Class', 'Origin', 'Unit', 'Purpose', 'Source', 'Class', 'Order'], axis=1, inplace=True)
In [95]:
df.head()
Out[95]:
Year Taxon Family Genus Importer Exporter Importer reported quantity Exporter reported quantity Term
0 2016 Branta sandvicensis Anatidae Branta CN GB 1.0 NaN bodies
1 2016 Falco hybrid Falconidae Falco AE GB 1.0 NaN live
2 2016 Falco hybrid Falconidae Falco AE GB 1080.0 14.0 live
3 2016 Falco hybrid Falconidae Falco AE GB 273.0 NaN live
4 2016 Falco hybrid Falconidae Falco AE GB 35.0 995.0 live
In [96]:
df.fillna(0)
Out[96]:
Year Taxon Family Genus Importer Exporter Importer reported quantity Exporter reported quantity Term
0 2016 Branta sandvicensis Anatidae Branta CN GB 1.0 0.0 bodies
1 2016 Falco hybrid Falconidae Falco AE GB 1.0 0.0 live
2 2016 Falco hybrid Falconidae Falco AE GB 1080.0 14.0 live
3 2016 Falco hybrid Falconidae Falco AE GB 273.0 0.0 live
4 2016 Falco hybrid Falconidae Falco AE GB 35.0 995.0 live
5 2016 Falco hybrid Falconidae Falco AE GB 15.0 265.0 live
6 2016 Falco hybrid Falconidae Falco AE GB 4.0 0.0 live
7 2016 Falco hybrid Falconidae Falco BH GB 0.0 49.0 live
8 2016 Falco hybrid Falconidae Falco JP GB 0.0 5.0 live
9 2016 Falco hybrid Falconidae Falco JP GB 0.0 10.0 live
10 2016 Falco hybrid Falconidae Falco KW GB 0.0 12.0 live
11 2016 Falco hybrid Falconidae Falco KW GB 0.0 19.0 live
12 2016 Falco hybrid Falconidae Falco QA GB 8.0 8.0 live
13 2016 Falco pelegrinoides Falconidae Falco JP GB 2.0 2.0 live
14 2016 Falco peregrinus Falconidae Falco AE GB 0.0 1.0 live
15 2016 Falco peregrinus Falconidae Falco AE GB 1.0 0.0 live
16 2016 Falco peregrinus Falconidae Falco AE GB 0.0 4.0 live
17 2016 Falco peregrinus Falconidae Falco AE GB 2.0 0.0 live
18 2016 Falco peregrinus Falconidae Falco AE GB 0.0 4.0 live
19 2016 Falco peregrinus Falconidae Falco AE GB 0.0 3.0 live
20 2016 Falco peregrinus Falconidae Falco AE GB 1.0 0.0 live
21 2016 Falco peregrinus Falconidae Falco AE GB 0.0 1.0 live
22 2016 Falco peregrinus Falconidae Falco AE GB 118.0 1.0 live
23 2016 Falco peregrinus Falconidae Falco AE GB 0.0 116.0 live
24 2016 Falco peregrinus Falconidae Falco JE GB 1.0 0.0 live
25 2016 Falco peregrinus Falconidae Falco JP GB 3.0 0.0 live
26 2016 Falco peregrinus Falconidae Falco JP GB 5.0 5.0 live
27 2016 Falco peregrinus Falconidae Falco QA GB 1.0 2.0 live
28 2016 Falco peregrinus Falconidae Falco QA GB 25.0 27.0 live
29 2016 Falco peregrinus Falconidae Falco QA GB 10.0 8.0 live
... ... ... ... ... ... ... ... ... ...
159 2016 Strix aluco Strigidae Strix JP GB 31.0 27.0 live
160 2016 Strix chacoensis Strigidae Strix JP GB 1.0 0.0 live
161 2016 Strix leptogrammica Strigidae Strix JP GB 6.0 4.0 live
162 2016 Strix nebulosa Strigidae Strix JP GB 18.0 16.0 live
163 2016 Strix nebulosa Strigidae Strix KW GB 0.0 2.0 live
164 2016 Strix rufipes Strigidae Strix JP GB 6.0 2.0 live
165 2016 Strix uralensis Strigidae Strix JP GB 10.0 10.0 live
166 2016 Strix virgata Strigidae Strix JP GB 12.0 7.0 live
167 2016 Strix woodfordii Strigidae Strix JP GB 3.0 1.0 live
168 2016 Surnia ulula Strigidae Surnia JP GB 13.0 8.0 live
169 2016 Brachypelma smithi Theraphosidae Brachypelma GG GB 1.0 0.0 live
170 2016 Amazilia tzacatl Trochilidae Amazilia US GB 1.0 0.0 feathers
171 2016 Campylopterus hemileucurus Trochilidae Campylopterus US GB 1.0 0.0 feathers
172 2016 Campylopterus rufus Trochilidae Campylopterus US GB 1.0 0.0 feathers
173 2016 Chrysolampis mosquitus Trochilidae Chrysolampis US GB 1.0 0.0 bodies
174 2016 Florisuga mellivora Trochilidae Florisuga US GB 1.0 0.0 feathers
175 2016 Heliangelus amethysticollis Trochilidae Heliangelus US GB 1.0 0.0 bodies
176 2016 Phaethornis longirostris Trochilidae Phaethornis US GB 1.0 0.0 feathers
177 2016 Selasphorus rufus Trochilidae Selasphorus US GB 1.0 0.0 feathers
178 2016 Tyto alba Tytonidae Tyto JP GB 27.0 20.0 live
179 2016 Tyto alba Tytonidae Tyto KW GB 0.0 5.0 live
180 2016 Tyto glaucops Tytonidae Tyto JP GB 4.0 4.0 live
181 2016 Psittaciformes spp. 0 0 US GB 1.0 0.0 feathers
182 2016 Pavo cristatus Phasianidae Pavo CH GB 0.0 1.0 feathers
183 2016 Pavo cristatus Phasianidae Pavo KE GB 20.0 0.0 feathers
184 2016 Pavo cristatus Phasianidae Pavo KE GB 2500.0 0.0 feathers
185 2016 Pavo cristatus Phasianidae Pavo US GB 0.0 500.0 feathers
186 2016 Pavo cristatus Phasianidae Pavo US GB 3830.0 150.0 feathers
187 2016 Pavo cristatus Phasianidae Pavo US GB 1.0 0.0 bodies
188 2016 Pavo cristatus Phasianidae Pavo US GB 1.0 0.0 bodies

189 rows × 9 columns

In [99]:
df.describe()
Out[99]:
Year Importer reported quantity Exporter reported quantity
count 189.0 126.000000 123.000000
mean 2016.0 73.468254 27.260163
std 0.0 416.643631 107.876587
min 2016.0 1.000000 1.000000
25% 2016.0 1.000000 2.000000
50% 2016.0 3.000000 4.000000
75% 2016.0 12.000000 10.000000
max 2016.0 3830.000000 995.000000
In [100]:
df.count()
Out[100]:
Year                          189
Taxon                         189
Family                        188
Genus                         185
Importer                      187
Exporter                      189
Importer reported quantity    126
Exporter reported quantity    123
Term                          189
dtype: int64
In [101]:
df.any()
Out[101]:
Year                          True
Taxon                         True
Family                        True
Genus                         True
Importer                      True
Exporter                      True
Importer reported quantity    True
Exporter reported quantity    True
Term                          True
dtype: bool
In [102]:
df.any(axis=1)
Out[102]:
0      True
1      True
2      True
3      True
4      True
5      True
6      True
7      True
8      True
9      True
10     True
11     True
12     True
13     True
14     True
15     True
16     True
17     True
18     True
19     True
20     True
21     True
22     True
23     True
24     True
25     True
26     True
27     True
28     True
29     True
       ... 
159    True
160    True
161    True
162    True
163    True
164    True
165    True
166    True
167    True
168    True
169    True
170    True
171    True
172    True
173    True
174    True
175    True
176    True
177    True
178    True
179    True
180    True
181    True
182    True
183    True
184    True
185    True
186    True
187    True
188    True
Length: 189, dtype: bool
In [103]:
df.rank(method='max')
Out[103]:
Year Taxon Family Genus Importer Exporter Importer reported quantity Exporter reported quantity Term
0 189.0 32.0 24.0 31.0 61.0 189.0 49.0 NaN 8.0
1 189.0 74.0 83.0 104.0 32.0 189.0 49.0 NaN 186.0
2 189.0 74.0 83.0 104.0 32.0 189.0 124.0 101.0 186.0
3 189.0 74.0 83.0 104.0 32.0 189.0 122.0 NaN 186.0
4 189.0 74.0 83.0 104.0 32.0 189.0 116.0 123.0 186.0
5 189.0 74.0 83.0 104.0 32.0 189.0 103.0 120.0 186.0
6 189.0 74.0 83.0 104.0 32.0 189.0 72.0 NaN 186.0
7 189.0 74.0 83.0 104.0 49.0 189.0 NaN 115.0 186.0
8 189.0 74.0 83.0 104.0 115.0 189.0 NaN 72.0 186.0
9 189.0 74.0 83.0 104.0 115.0 189.0 NaN 93.0 186.0
10 189.0 74.0 83.0 104.0 129.0 189.0 NaN 98.0 186.0
11 189.0 74.0 83.0 104.0 129.0 189.0 NaN 104.0 186.0
12 189.0 74.0 83.0 104.0 142.0 189.0 85.0 89.0 186.0
13 189.0 75.0 83.0 104.0 115.0 189.0 60.0 45.0 186.0
14 189.0 91.0 83.0 104.0 32.0 189.0 NaN 25.0 186.0
15 189.0 91.0 83.0 104.0 32.0 189.0 49.0 NaN 186.0
16 189.0 91.0 83.0 104.0 32.0 189.0 NaN 64.0 186.0
17 189.0 91.0 83.0 104.0 32.0 189.0 60.0 NaN 186.0
18 189.0 91.0 83.0 104.0 32.0 189.0 NaN 64.0 186.0
19 189.0 91.0 83.0 104.0 32.0 189.0 NaN 56.0 186.0
20 189.0 91.0 83.0 104.0 32.0 189.0 49.0 NaN 186.0
21 189.0 91.0 83.0 104.0 32.0 189.0 NaN 25.0 186.0
22 189.0 91.0 83.0 104.0 32.0 189.0 120.0 25.0 186.0
23 189.0 91.0 83.0 104.0 32.0 189.0 NaN 117.0 186.0
24 189.0 91.0 83.0 104.0 70.0 189.0 49.0 NaN 186.0
25 189.0 91.0 83.0 104.0 115.0 189.0 69.0 NaN 186.0
26 189.0 91.0 83.0 104.0 115.0 189.0 76.0 72.0 186.0
27 189.0 91.0 83.0 104.0 142.0 189.0 49.0 45.0 186.0
28 189.0 91.0 83.0 104.0 142.0 189.0 112.0 113.0 186.0
29 189.0 91.0 83.0 104.0 142.0 189.0 93.0 89.0 186.0
... ... ... ... ... ... ... ... ... ...
159 189.0 175.0 174.0 180.0 115.0 189.0 114.0 113.0 186.0
160 189.0 176.0 174.0 180.0 115.0 189.0 49.0 NaN 186.0
161 189.0 177.0 174.0 180.0 115.0 189.0 82.0 64.0 186.0
162 189.0 179.0 174.0 180.0 115.0 189.0 105.0 102.0 186.0
163 189.0 179.0 174.0 180.0 129.0 189.0 NaN 45.0 186.0
164 189.0 180.0 174.0 180.0 115.0 189.0 82.0 45.0 186.0
165 189.0 181.0 174.0 180.0 115.0 189.0 93.0 93.0 186.0
166 189.0 182.0 174.0 180.0 115.0 189.0 98.0 82.0 186.0
167 189.0 183.0 174.0 180.0 115.0 189.0 69.0 25.0 186.0
168 189.0 185.0 174.0 182.0 115.0 189.0 100.0 89.0 186.0
169 189.0 31.0 176.0 30.0 66.0 189.0 49.0 NaN 186.0
170 189.0 13.0 185.0 12.0 185.0 189.0 49.0 NaN 30.0
171 189.0 46.0 185.0 46.0 185.0 189.0 49.0 NaN 30.0
172 189.0 47.0 185.0 46.0 185.0 189.0 49.0 NaN 30.0
173 189.0 48.0 185.0 47.0 185.0 189.0 49.0 NaN 8.0
174 189.0 106.0 185.0 105.0 185.0 189.0 49.0 NaN 30.0
175 189.0 110.0 185.0 109.0 185.0 189.0 49.0 NaN 8.0
176 189.0 138.0 185.0 137.0 185.0 189.0 49.0 NaN 30.0
177 189.0 172.0 185.0 169.0 185.0 189.0 49.0 NaN 30.0
178 189.0 188.0 188.0 185.0 115.0 189.0 113.0 107.0 186.0
179 189.0 188.0 188.0 185.0 129.0 189.0 NaN 72.0 186.0
180 189.0 189.0 188.0 185.0 115.0 189.0 72.0 64.0 186.0
181 189.0 152.0 NaN NaN 185.0 189.0 49.0 NaN 30.0
182 189.0 136.0 92.0 135.0 58.0 189.0 NaN 25.0 30.0
183 189.0 136.0 92.0 135.0 117.0 189.0 107.0 NaN 30.0
184 189.0 136.0 92.0 135.0 117.0 189.0 125.0 NaN 30.0
185 189.0 136.0 92.0 135.0 185.0 189.0 NaN 122.0 30.0
186 189.0 136.0 92.0 135.0 185.0 189.0 126.0 119.0 30.0
187 189.0 136.0 92.0 135.0 185.0 189.0 49.0 NaN 8.0
188 189.0 136.0 92.0 135.0 185.0 189.0 49.0 NaN 8.0

189 rows × 9 columns

In [104]:
df.rank(method='min')
Out[104]:
Year Taxon Family Genus Importer Exporter Importer reported quantity Exporter reported quantity Term
0 1.0 32.0 24.0 31.0 59.0 1.0 1.0 NaN 1.0
1 1.0 63.0 28.0 52.0 1.0 1.0 1.0 NaN 32.0
2 1.0 63.0 28.0 52.0 1.0 1.0 124.0 99.0 32.0
3 1.0 63.0 28.0 52.0 1.0 1.0 122.0 NaN 32.0
4 1.0 63.0 28.0 52.0 1.0 1.0 116.0 123.0 32.0
5 1.0 63.0 28.0 52.0 1.0 1.0 103.0 120.0 32.0
6 1.0 63.0 28.0 52.0 1.0 1.0 70.0 NaN 32.0
7 1.0 63.0 28.0 52.0 47.0 1.0 NaN 115.0 32.0
8 1.0 63.0 28.0 52.0 71.0 1.0 NaN 65.0 32.0
9 1.0 63.0 28.0 52.0 71.0 1.0 NaN 90.0 32.0
10 1.0 63.0 28.0 52.0 119.0 1.0 NaN 95.0 32.0
11 1.0 63.0 28.0 52.0 119.0 1.0 NaN 103.0 32.0
12 1.0 63.0 28.0 52.0 133.0 1.0 85.0 83.0 32.0
13 1.0 75.0 28.0 52.0 71.0 1.0 50.0 26.0 32.0
14 1.0 76.0 28.0 52.0 1.0 1.0 NaN 1.0 32.0
15 1.0 76.0 28.0 52.0 1.0 1.0 1.0 NaN 32.0
16 1.0 76.0 28.0 52.0 1.0 1.0 NaN 57.0 32.0
17 1.0 76.0 28.0 52.0 1.0 1.0 50.0 NaN 32.0
18 1.0 76.0 28.0 52.0 1.0 1.0 NaN 57.0 32.0
19 1.0 76.0 28.0 52.0 1.0 1.0 NaN 46.0 32.0
20 1.0 76.0 28.0 52.0 1.0 1.0 1.0 NaN 32.0
21 1.0 76.0 28.0 52.0 1.0 1.0 NaN 1.0 32.0
22 1.0 76.0 28.0 52.0 1.0 1.0 120.0 1.0 32.0
23 1.0 76.0 28.0 52.0 1.0 1.0 NaN 117.0 32.0
24 1.0 76.0 28.0 52.0 68.0 1.0 1.0 NaN 32.0
25 1.0 76.0 28.0 52.0 71.0 1.0 61.0 NaN 32.0
26 1.0 76.0 28.0 52.0 71.0 1.0 73.0 65.0 32.0
27 1.0 76.0 28.0 52.0 133.0 1.0 1.0 26.0 32.0
28 1.0 76.0 28.0 52.0 133.0 1.0 110.0 112.0 32.0
29 1.0 76.0 28.0 52.0 133.0 1.0 87.0 83.0 32.0
... ... ... ... ... ... ... ... ... ...
159 1.0 174.0 135.0 171.0 71.0 1.0 114.0 112.0 32.0
160 1.0 176.0 135.0 171.0 71.0 1.0 1.0 NaN 32.0
161 1.0 177.0 135.0 171.0 71.0 1.0 77.0 57.0 32.0
162 1.0 178.0 135.0 171.0 71.0 1.0 104.0 102.0 32.0
163 1.0 178.0 135.0 171.0 119.0 1.0 NaN 26.0 32.0
164 1.0 180.0 135.0 171.0 71.0 1.0 77.0 26.0 32.0
165 1.0 181.0 135.0 171.0 71.0 1.0 87.0 90.0 32.0
166 1.0 182.0 135.0 171.0 71.0 1.0 94.0 78.0 32.0
167 1.0 183.0 135.0 171.0 71.0 1.0 61.0 1.0 32.0
168 1.0 185.0 135.0 182.0 71.0 1.0 99.0 83.0 32.0
169 1.0 31.0 176.0 30.0 64.0 1.0 1.0 NaN 32.0
170 1.0 13.0 177.0 12.0 154.0 1.0 1.0 NaN 10.0
171 1.0 46.0 177.0 45.0 154.0 1.0 1.0 NaN 10.0
172 1.0 47.0 177.0 45.0 154.0 1.0 1.0 NaN 10.0
173 1.0 48.0 177.0 47.0 154.0 1.0 1.0 NaN 1.0
174 1.0 106.0 177.0 105.0 154.0 1.0 1.0 NaN 10.0
175 1.0 110.0 177.0 109.0 154.0 1.0 1.0 NaN 1.0
176 1.0 138.0 177.0 137.0 154.0 1.0 1.0 NaN 10.0
177 1.0 172.0 177.0 169.0 154.0 1.0 1.0 NaN 10.0
178 1.0 187.0 186.0 183.0 71.0 1.0 113.0 105.0 32.0
179 1.0 187.0 186.0 183.0 119.0 1.0 NaN 65.0 32.0
180 1.0 189.0 186.0 183.0 71.0 1.0 70.0 57.0 32.0
181 1.0 152.0 NaN NaN 154.0 1.0 1.0 NaN 10.0
182 1.0 130.0 84.0 129.0 57.0 1.0 NaN 1.0 10.0
183 1.0 130.0 84.0 129.0 116.0 1.0 106.0 NaN 10.0
184 1.0 130.0 84.0 129.0 116.0 1.0 125.0 NaN 10.0
185 1.0 130.0 84.0 129.0 154.0 1.0 NaN 122.0 10.0
186 1.0 130.0 84.0 129.0 154.0 1.0 126.0 119.0 10.0
187 1.0 130.0 84.0 129.0 154.0 1.0 1.0 NaN 1.0
188 1.0 130.0 84.0 129.0 154.0 1.0 1.0 NaN 1.0

189 rows × 9 columns

In [105]:
df.groupby
Out[105]:
<bound method NDFrame.groupby of      Year                        Taxon         Family          Genus Importer  \
0    2016          Branta sandvicensis       Anatidae         Branta       CN   
1    2016                 Falco hybrid     Falconidae          Falco       AE   
2    2016                 Falco hybrid     Falconidae          Falco       AE   
3    2016                 Falco hybrid     Falconidae          Falco       AE   
4    2016                 Falco hybrid     Falconidae          Falco       AE   
5    2016                 Falco hybrid     Falconidae          Falco       AE   
6    2016                 Falco hybrid     Falconidae          Falco       AE   
7    2016                 Falco hybrid     Falconidae          Falco       BH   
8    2016                 Falco hybrid     Falconidae          Falco       JP   
9    2016                 Falco hybrid     Falconidae          Falco       JP   
10   2016                 Falco hybrid     Falconidae          Falco       KW   
11   2016                 Falco hybrid     Falconidae          Falco       KW   
12   2016                 Falco hybrid     Falconidae          Falco       QA   
13   2016          Falco pelegrinoides     Falconidae          Falco       JP   
14   2016             Falco peregrinus     Falconidae          Falco       AE   
15   2016             Falco peregrinus     Falconidae          Falco       AE   
16   2016             Falco peregrinus     Falconidae          Falco       AE   
17   2016             Falco peregrinus     Falconidae          Falco       AE   
18   2016             Falco peregrinus     Falconidae          Falco       AE   
19   2016             Falco peregrinus     Falconidae          Falco       AE   
20   2016             Falco peregrinus     Falconidae          Falco       AE   
21   2016             Falco peregrinus     Falconidae          Falco       AE   
22   2016             Falco peregrinus     Falconidae          Falco       AE   
23   2016             Falco peregrinus     Falconidae          Falco       AE   
24   2016             Falco peregrinus     Falconidae          Falco       JE   
25   2016             Falco peregrinus     Falconidae          Falco       JP   
26   2016             Falco peregrinus     Falconidae          Falco       JP   
27   2016             Falco peregrinus     Falconidae          Falco       QA   
28   2016             Falco peregrinus     Falconidae          Falco       QA   
29   2016             Falco peregrinus     Falconidae          Falco       QA   
..    ...                          ...            ...            ...      ...   
159  2016                  Strix aluco      Strigidae          Strix       JP   
160  2016             Strix chacoensis      Strigidae          Strix       JP   
161  2016          Strix leptogrammica      Strigidae          Strix       JP   
162  2016               Strix nebulosa      Strigidae          Strix       JP   
163  2016               Strix nebulosa      Strigidae          Strix       KW   
164  2016                Strix rufipes      Strigidae          Strix       JP   
165  2016              Strix uralensis      Strigidae          Strix       JP   
166  2016                Strix virgata      Strigidae          Strix       JP   
167  2016             Strix woodfordii      Strigidae          Strix       JP   
168  2016                 Surnia ulula      Strigidae         Surnia       JP   
169  2016           Brachypelma smithi  Theraphosidae    Brachypelma       GG   
170  2016             Amazilia tzacatl    Trochilidae       Amazilia       US   
171  2016   Campylopterus hemileucurus    Trochilidae  Campylopterus       US   
172  2016          Campylopterus rufus    Trochilidae  Campylopterus       US   
173  2016       Chrysolampis mosquitus    Trochilidae   Chrysolampis       US   
174  2016          Florisuga mellivora    Trochilidae      Florisuga       US   
175  2016  Heliangelus amethysticollis    Trochilidae    Heliangelus       US   
176  2016     Phaethornis longirostris    Trochilidae    Phaethornis       US   
177  2016            Selasphorus rufus    Trochilidae    Selasphorus       US   
178  2016                    Tyto alba      Tytonidae           Tyto       JP   
179  2016                    Tyto alba      Tytonidae           Tyto       KW   
180  2016                Tyto glaucops      Tytonidae           Tyto       JP   
181  2016          Psittaciformes spp.            NaN            NaN       US   
182  2016               Pavo cristatus    Phasianidae           Pavo       CH   
183  2016               Pavo cristatus    Phasianidae           Pavo       KE   
184  2016               Pavo cristatus    Phasianidae           Pavo       KE   
185  2016               Pavo cristatus    Phasianidae           Pavo       US   
186  2016               Pavo cristatus    Phasianidae           Pavo       US   
187  2016               Pavo cristatus    Phasianidae           Pavo       US   
188  2016               Pavo cristatus    Phasianidae           Pavo       US   

    Exporter  Importer reported quantity  Exporter reported quantity      Term  
0         GB                         1.0                         NaN    bodies  
1         GB                         1.0                         NaN      live  
2         GB                      1080.0                        14.0      live  
3         GB                       273.0                         NaN      live  
4         GB                        35.0                       995.0      live  
5         GB                        15.0                       265.0      live  
6         GB                         4.0                         NaN      live  
7         GB                         NaN                        49.0      live  
8         GB                         NaN                         5.0      live  
9         GB                         NaN                        10.0      live  
10        GB                         NaN                        12.0      live  
11        GB                         NaN                        19.0      live  
12        GB                         8.0                         8.0      live  
13        GB                         2.0                         2.0      live  
14        GB                         NaN                         1.0      live  
15        GB                         1.0                         NaN      live  
16        GB                         NaN                         4.0      live  
17        GB                         2.0                         NaN      live  
18        GB                         NaN                         4.0      live  
19        GB                         NaN                         3.0      live  
20        GB                         1.0                         NaN      live  
21        GB                         NaN                         1.0      live  
22        GB                       118.0                         1.0      live  
23        GB                         NaN                       116.0      live  
24        GB                         1.0                         NaN      live  
25        GB                         3.0                         NaN      live  
26        GB                         5.0                         5.0      live  
27        GB                         1.0                         2.0      live  
28        GB                        25.0                        27.0      live  
29        GB                        10.0                         8.0      live  
..       ...                         ...                         ...       ...  
159       GB                        31.0                        27.0      live  
160       GB                         1.0                         NaN      live  
161       GB                         6.0                         4.0      live  
162       GB                        18.0                        16.0      live  
163       GB                         NaN                         2.0      live  
164       GB                         6.0                         2.0      live  
165       GB                        10.0                        10.0      live  
166       GB                        12.0                         7.0      live  
167       GB                         3.0                         1.0      live  
168       GB                        13.0                         8.0      live  
169       GB                         1.0                         NaN      live  
170       GB                         1.0                         NaN  feathers  
171       GB                         1.0                         NaN  feathers  
172       GB                         1.0                         NaN  feathers  
173       GB                         1.0                         NaN    bodies  
174       GB                         1.0                         NaN  feathers  
175       GB                         1.0                         NaN    bodies  
176       GB                         1.0                         NaN  feathers  
177       GB                         1.0                         NaN  feathers  
178       GB                        27.0                        20.0      live  
179       GB                         NaN                         5.0      live  
180       GB                         4.0                         4.0      live  
181       GB                         1.0                         NaN  feathers  
182       GB                         NaN                         1.0  feathers  
183       GB                        20.0                         NaN  feathers  
184       GB                      2500.0                         NaN  feathers  
185       GB                         NaN                       500.0  feathers  
186       GB                      3830.0                       150.0  feathers  
187       GB                         1.0                         NaN    bodies  
188       GB                         1.0                         NaN    bodies  

[189 rows x 9 columns]>
In [106]:
df.dtypes
Out[106]:
Year                            int64
Taxon                          object
Family                         object
Genus                          object
Importer                       object
Exporter                       object
Importer reported quantity    float64
Exporter reported quantity    float64
Term                           object
dtype: object
In [107]:
df.Importer.value_counts()
Out[107]:
JP    45
AE    32
US    32
BB    13
KW    11
QA    10
CA     7
TH     5
TW     4
BH     3
GG     3
CN     3
JE     3
CH     2
NO     2
KE     2
FR     2
ID     1
ZA     1
PH     1
TR     1
KR     1
AU     1
SG     1
ZW     1
Name: Importer, dtype: int64

Japan United State of America and the United Arab Emirates amongst the highest

In [110]:
df.corr('pearson')
Out[110]:
Year Importer reported quantity Exporter reported quantity
Year NaN NaN NaN
Importer reported quantity NaN 1.000000 0.094993
Exporter reported quantity NaN 0.094993 1.000000
In [111]:
df['Family'].unique()
Out[111]:
array(['Anatidae', 'Falconidae', 'Phasianidae', 'Psittacidae',
       'Scolopacidae', 'Struthionidae', 'Trochilidae', 'Accipitridae',
       'Bucerotidae', 'Cacatuidae', 'Rheidae', 'Strigidae',
       'Theraphosidae', 'Tytonidae', nan], dtype=object)
In [112]:
df_Family_ = df[(df['Family'] == 'Anatidae') | (df['Family'] == 'Falconidae') | (df['Family'] == 'Phasianidae') | (df['Family'] == 'Psittacidae') |(df['Family'] == 'Scolopacidae') |(df['Family'] == 'Struthionidae')|(df['Family'] == 'Trochilidae')|(df['Family'] == 'Accipitridae')|(df['Family'] == 'Bucerotidae')|(df['Family'] == 'Cacatuidae')|(df['Family'] == 'Rheidae')|(df['Family'] == 'Strigidae')|(df['Family'] == 'Theraphosidae')]
In [113]:
df_Family_ = df[(df['Family'] == 'Anatidae') | (df['Family'] == 'Falconidae') | (df['Family'] == 'Phasianidae') | (df['Family'] == 'Psittacidae') |(df['Family'] == 'Scolopacidae') |(df['Family'] == 'Struthionidae')|(df['Family'] == 'Trochilidae')|(df['Family'] == 'Accipitridae')|(df['Family'] == 'Bucerotidae')|(df['Family'] == 'Cacatuidae')|(df['Family'] == 'Rheidae')|(df['Family'] == 'Strigidae')|(df['Family'] == 'Theraphosidae')]
In [114]:
df_Family_.shape
Out[114]:
(185, 9)
In [115]:
df.groupby('Family')[['Exporter']].sum()
Out[115]:
Exporter
Family
Accipitridae GBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGB
Anatidae GB
Bucerotidae GB
Cacatuidae GBGB
Falconidae GBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGB...
Phasianidae GBGBGBGBGBGBGBGBGB
Psittacidae GBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGB...
Rheidae GB
Scolopacidae GB
Strigidae GBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGBGB...
Struthionidae GB
Theraphosidae GB
Trochilidae GBGBGBGBGBGBGBGBGB
Tytonidae GBGBGB
In [116]:
fig, ax = plt.subplots(figsize=(20,8))
sns.countplot( x='Family', data=df, ax=ax).set_title('Exporter biggest family of birds')
Out[116]:
Text(0.5, 1.0, 'Exporter biggest family of birds')
In [117]:
df = pd.read_csv('Confirmedincidents.csv')
In [118]:
df.head()
Out[118]:
OBJECTID RSPB_Reference County Incident_Type Month Year Grid_Square Details More_Info_Here Country GlobalID Shape__Area Shape__Length
0 3174 88956 ARMAGH Poisoning June 2007 H84 Species targeted: Birds of prey. Species invol... No Link NORTHERN IRELAND c33c2dfb-1194-45fd-9307-987badbaca59 293631950.1 68542.83426
1 3175 89513 LONDONDERRY Poisoning December 2007 C41 Species involved: Buzzard x 1. Tested positive... No Link NORTHERN IRELAND cb734612-000b-40ee-99c8-24d2941b7f12 302936231.3 69620.31785
2 3176 90307 DOWN Shooting August 2008 J24 Species involved: Red kite x 1. No Link NORTHERN IRELAND 94d7ae6a-41f8-4cfe-b33d-9a8e8b971eb4 293454585.9 68522.13007
3 3177 90393 ARMAGH Poisoning July 2008 J03 Species involved: Buzzard x 2; poison bait (ra... No Link NORTHERN IRELAND 4d303033-4e4c-4c6e-988e-a180b610de61 292279860.3 68384.84255
4 3178 90645 ARMAGH Poisoning July 2008 J03 Species involved: Buzzard x 2; crow x 1. Teste... No Link NORTHERN IRELAND 151bbc71-e663-4f6a-99ed-d9c38f33cf44 292279860.3 68384.84255
In [119]:
dfBirds_popTI = df.pop('OBJECTID'), ('RSPB Reference'), ('Grid_Square'), ('More_Info_Here'), ('GlobalID'), ('Shape__Area'), ('Shape__Length')
dfBirds_popTI
Out[119]:
(0       3174
 1       3175
 2       3176
 3       3177
 4       3178
 5       3179
 6       3180
 7       3181
 8       3182
 9       3183
 10      3184
 11      3185
 12      3186
 13      3187
 14      3188
 15      3189
 16      3190
 17      3191
 18      3192
 19      3193
 20      3194
 21      3195
 22      3196
 23      3197
 24      3198
 25      3199
 26      3200
 27      3201
 28      3202
 29      3203
         ... 
 1195    4369
 1196    4370
 1197    4371
 1198    4372
 1199    4373
 1200    4374
 1201    4375
 1202    4376
 1203    4377
 1204    4378
 1205    4379
 1206    4380
 1207    4381
 1208    4382
 1209    4383
 1210    4384
 1211    4385
 1212    4386
 1213    4387
 1214    4388
 1215    4389
 1216    4390
 1217    4391
 1218    4392
 1219    4393
 1220    4394
 1221    4395
 1222    4396
 1223    4397
 1224    4398
 Name: OBJECTID, Length: 1225, dtype: int64,
 'RSPB Reference',
 'Grid_Square',
 'More_Info_Here',
 'GlobalID',
 'Shape__Area',
 'Shape__Length')
In [120]:
df_popTI = df.pop('RSPB_Reference')
df_popTI
Out[120]:
0        88956
1        89513
2        90307
3        90393
4        90645
5        91009
6        91145
7        91345
8        92187
9        92553
10       92559
11       92953
12       96803
13       93405
14       93557
15       93934
16       93935
17       93936
18       93938
19       93939
20       94259
21       94260
22       94319
23       94320
24       94717
25       95030
26       95053
27       95130
28       95594
29       95776
         ...  
1195    100027
1196    100026
1197    100030
1198    100111
1199    100155
1200    100200
1201    100348
1202    100490
1203    100405
1204    100487
1205    100073
1206    100085
1207    100126
1208    100142
1209    100496
1210    100401
1211    100182
1212    100502
1213    100384
1214    100364
1215    100212
1216    100303
1217    100406
1218    100404
1219    100542
1220    100550
1221    100556
1222    100557
1223    100575
1224    100678
Name: RSPB_Reference, Length: 1225, dtype: int64
In [121]:
df_popTI = df.pop('Grid_Square')
df_popTI
Out[121]:
0        H84
1        C41
2        J24
3        J03
4        J03
5        H98
6        D31
7        J03
8        J03
9        H85
10       J44
11       H84
12       J03
13       J65
14       H17
15       J39
16       D02
17       H94
18       C50
19       J03
20       D30
21       H37
22       C50
23       J34
24       J03
25       J03
26       C83
27       D13
28       J29
29       J03
        ... 
1195    SU26
1196    SU26
1197    SE00
1198    SE16
1199    SE06
1200    SP11
1201    SO67
1202    SE97
1203    NH73
1204    SE16
1205    SE63
1206    SE17
1207    SP86
1208    ST68
1209    SO36
1210    NS42
1211    SE17
1212    SO36
1213    SE86
1214    NN84
1215    TL39
1216    SK18
1217    NN85
1218    NS81
1219    NZ23
1220    SO42
1221    SU72
1222    SX86
1223    SE16
1224    SJ91
Name: Grid_Square, Length: 1225, dtype: object
In [122]:
df_popTI = df.pop('More_Info_Here')
df_popTI
Out[122]:
0                                                 No Link
1                                                 No Link
2                                                 No Link
3                                                 No Link
4                                                 No Link
5                                                 No Link
6                                                 No Link
7                                                 No Link
8                                                 No Link
9                                                 No Link
10                                                No Link
11                                                No Link
12                                                No Link
13                                                No Link
14                                                No Link
15                                                No Link
16                                                No Link
17                                                No Link
18                                                No Link
19                                                No Link
20                                                No Link
21                                                No Link
22                                                No Link
23                                                No Link
24                                                No Link
25                                                No Link
26                                                No Link
27                                                No Link
28                                                No Link
29                                                No Link
                              ...                        
1195                                              No Link
1196                                              No Link
1197    https://www.yorkshirepost.co.uk/news/crime/pol...
1198    https://northyorkshire.police.uk/news/double-b...
1199                                              No Link
1200                                              No Link
1201                                              No Link
1202                                              No Link
1203    https://www.scotland.police.uk/whats-happening...
1204                                              No Link
1205    https://northyorkshire.police.uk/news/double-b...
1206    https://community.rspb.org.uk/ourwork/b/invest...
1207    https://www.northantstelegraph.co.uk/news/buzz...
1208                                              No Link
1209                                              No Link
1210    https://www.birdguides.com/news/buzzard-found-...
1211    https://community.rspb.org.uk/ourwork/b/invest...
1212                                              No Link
1213                                              No Link
1214    https://www.rspb.org.uk/about-the-rspb/about-u...
1215                                              No Link
1216    https://pdrmg.wordpress.com/2019/05/09/goshawk...
1217    https://www.independent.co.uk/news/uk/crime/po...
1218    https://www.carlukegazette.co.uk/news/crime/po...
1219                                              No Link
1220                                              No Link
1221                                              No Link
1222                                              No Link
1223                                              No Link
1224                                              No Link
Name: More_Info_Here, Length: 1225, dtype: object
In [123]:
df_popTI = df.pop('GlobalID')
df_popTI
Out[123]:
0       c33c2dfb-1194-45fd-9307-987badbaca59
1       cb734612-000b-40ee-99c8-24d2941b7f12
2       94d7ae6a-41f8-4cfe-b33d-9a8e8b971eb4
3       4d303033-4e4c-4c6e-988e-a180b610de61
4       151bbc71-e663-4f6a-99ed-d9c38f33cf44
5       85b02cb9-844d-42e8-a81f-42f0d26af4dd
6       a52ffc84-18ed-4bb5-bb49-cafa1926f398
7       e493ccb2-8d10-437e-bacf-0b4c01bbc94a
8       724ec48f-52c6-4d71-90f9-a59aef0372da
9       9c044817-67b9-4fe4-bcbb-ad24823c4153
10      f678f3d9-8367-4b3c-b9a8-b57182c740c7
11      efaf7a16-3551-4710-bacb-858d483e1a51
12      c842d2d6-21ad-46b4-a2b7-bc8fd165c3f5
13      7e166f48-a1cf-419e-9222-cf95c4ec0d7e
14      d245cb28-8f30-469b-a483-408ad2aa91a8
15      9e7b6eec-14d2-4b4f-ae19-32832d30adfe
16      7ea2ac62-0c80-472a-bb40-b498b6445856
17      9fab97ba-7e92-47fa-8fef-12da2ec44cb3
18      9112fcc7-cf07-48f2-a859-0b451c85e8a8
19      0b154430-462f-4022-9c6f-013b68f3dc6a
20      d6367348-ac2b-4cac-bc94-0dbbaaad7c92
21      263f0fbc-88ce-4258-8cfd-ad64b4c43b72
22      0a27e5ee-7d78-4c51-9ad7-89a15327b39e
23      6d12900e-52f6-44d2-80e9-04aff06740ae
24      0fd46e4b-9a6c-45ba-9485-e50db1ef7464
25      1cdfaf0d-feff-46b4-a9e9-2246712f8813
26      c354f433-ca61-4673-b3a2-242b37a4c306
27      96fb03a0-f8af-4574-b7d5-bbbe9f6cebc2
28      0ea3f211-0d20-4ba5-b8eb-b2d35a6acd12
29      b51c5aa1-504c-48f5-8dc3-7bea261b9a0c
                        ...                 
1195    c5838f04-f85a-47b9-9013-551618d59b86
1196    7df1fb5f-c1c3-4c51-aeed-b241d25d3b8f
1197    5fedcc9e-fcec-4d21-8921-e213d48b1c3d
1198    63ed537f-7856-4553-96d0-b559800ecc4c
1199    f2a4de86-a49a-4e2d-a2bd-bccf0f090110
1200    9c9f5346-7ce1-4880-a51f-1ef595c9c187
1201    3155fe27-9d4d-427a-af92-0f3ec23f4e55
1202    6b74cb20-ca8e-41ff-b7f4-290017104e91
1203    10564b6c-c8c0-4792-80cf-2da5483dcfb6
1204    2a2497e5-e15a-4917-9813-fadb057ca45f
1205    eaf8a5db-de88-4a90-acb1-cad71dc79868
1206    7f14874e-e277-4ddb-9108-7964ae970853
1207    4db157dd-2a9f-4b22-8c6f-a1e763312ad7
1208    debe677f-651a-4ce3-8b91-8bc6b1eeee3d
1209    2d10042b-0b8b-4ce2-b6d8-9ea07f176f24
1210    50246f97-3922-44b2-908d-7788e7df4df1
1211    e8aa78dc-f6dd-4771-8c72-73283cd768bb
1212    7f02d98a-74fc-408f-890d-bd5ef70f9e5c
1213    39c03407-a35d-4209-a931-9b594f07e085
1214    d50241fb-5470-453d-a43c-f91ed6ff1cf0
1215    0b846a34-cb57-46ab-85c4-ae3d239eacb3
1216    84881a9c-3cdc-4c28-8a6b-ea1a8a320b79
1217    28ff0e1d-d8a6-4390-a962-b103b50cdf32
1218    0670fb2d-3eab-4778-9220-90d479eb8cad
1219    a37494e2-fb71-4522-81fa-596087be899e
1220    faee29f9-3ad5-4b4a-9e97-322e945553f0
1221    fa52fe93-9bb4-4b29-845d-18a42c7dd4b0
1222    b965ae2a-82f4-4dad-a456-eac52bfa8c3b
1223    3224b1c5-5f22-4aed-84d4-5c13f60fcf3c
1224    c1a827f3-f637-4c02-8e32-54e9053dd206
Name: GlobalID, Length: 1225, dtype: object
In [124]:
df_popTI = df.pop ('Shape__Length')
df_popTI
Out[124]:
0       68542.83426
1       69620.31785
2       68522.13007
3       68384.84255
4       68384.84255
5       69141.26234
6       69578.49524
7       68384.84255
8       68384.84255
9       68692.33747
10      68508.82732
11      68542.83426
12      68384.84255
13      68642.74140
14      69011.42576
15      69270.63941
16      69752.41723
17      68538.39656
18      69463.11897
19      68384.84255
20      69424.14011
21      69008.91231
22      69463.11897
23      68515.72445
24      68384.84255
25      68384.84255
26      69918.57004
27      69902.87043
28      69277.25944
29      68384.84255
           ...     
1195    64067.94416
1196    64067.94416
1197    67271.95151
1198    68138.44523
1199    68138.92416
1200    64703.02843
1201    65484.19249
1202    68264.30396
1203    74128.40827
1204    68138.44523
1205    67691.95880
1206    68285.71151
1207    65339.16458
1208    64318.42144
1209    65345.50230
1210    70530.99923
1211    68285.71151
1212    65345.50230
1213    68121.52857
1214    72550.25271
1215    65713.92795
1216    66988.70802
1217    72722.36306
1218    70400.26448
1219    69185.48362
1220    64826.00471
1221    63562.42175
1222    62823.51760
1223    68138.44523
1224    66022.95423
Name: Shape__Length, Length: 1225, dtype: float64
In [125]:
df_popTI = df.pop('Shape__Area')
df_popTI
Out[125]:
0       293631950.1
1       302936231.3
2       293454585.9
3       292279860.3
4       292279860.3
5       298781575.8
6       302572376.7
7       292279860.3
8       292279860.3
9       294914268.6
10      293340655.1
11      293631950.1
12      292279860.3
13      294488562.3
14      297660497.2
15      299900782.7
16      304086921.1
17      293593929.7
18      301569746.6
19      292279860.3
20      301231391.5
21      297638815.3
22      301569746.6
23      293399722.5
24      292279860.3
25      292279860.3
26      305537341.3
27      305400144.5
28      299958107.4
29      292279860.3
           ...     
1195    256543278.8
1196    256543278.8
1197    282844159.3
1198    290177425.0
1199    290181504.2
1200    261654557.2
1201    268010657.8
1202    291250391.6
1203    343438222.1
1204    290177425.0
1205    286387023.1
1206    291433092.2
1207    266824842.3
1208    258553146.5
1209    266876607.6
1210    310913300.9
1211    291433092.2
1212    266876607.6
1213    290033358.1
1214    328970624.1
1215    269894461.0
1216    280467380.7
1217    330533305.6
1218    309761763.9
1219    299163887.4
1220    262650119.8
1221    252510775.9
1222    246674078.5
1223    290177425.0
1224    272438847.5
Name: Shape__Area, Length: 1225, dtype: float64
In [126]:
df.head()
Out[126]:
County Incident_Type Month Year Details Country
0 ARMAGH Poisoning June 2007 Species targeted: Birds of prey. Species invol... NORTHERN IRELAND
1 LONDONDERRY Poisoning December 2007 Species involved: Buzzard x 1. Tested positive... NORTHERN IRELAND
2 DOWN Shooting August 2008 Species involved: Red kite x 1. NORTHERN IRELAND
3 ARMAGH Poisoning July 2008 Species involved: Buzzard x 2; poison bait (ra... NORTHERN IRELAND
4 ARMAGH Poisoning July 2008 Species involved: Buzzard x 2; crow x 1. Teste... NORTHERN IRELAND
In [127]:
sns.factorplot(x="County", hue="Incident_Type",
...                    data=df, kind="count",
...                    height=20, aspect=20);
/srv/conda/envs/notebook/lib/python3.7/site-packages/seaborn/categorical.py:3666: UserWarning:

The `factorplot` function has been renamed to `catplot`. The original name will be removed in a future release. Please update your code. Note that the default `kind` in `factorplot` (`'point'`) has changed `'strip'` in `catplot`.

In [128]:
sns.factorplot(x="Country", hue="Incident_Type",
...                    data=df, kind="count",
...                    height=10, aspect=20);
In [129]:
sns.catplot(y="Incident_Type", kind="count",
            palette="pastel", edgecolor=".6",
            data=df, order = df['Incident_Type'].value_counts().index);
In [130]:
sns.catplot(y="Country", kind="count",
            palette="pastel", edgecolor=".6",
            data=df, order = df['Country'].value_counts().index);
In [138]:
import pandas as pd
import hvplot.pandas 
In [139]:
import hvplot
import hvplot.pandas 
In [140]:
import panel as pn
import hvplot.pandas
In [141]:
df_2007_18 = pd.read_csv('Confirmed_Raptor_Persecution_Incidents_Public.csv')
In [142]:
df_2007_18.head()
Out[142]:
OBJECTID RSPB_Reference County Incident_Type Month Year Grid_Square Details More_Info_Here Country GlobalID Shape__Area Shape__Length
0 3174 88956 ARMAGH Poisoning June 2007 H84 Species targeted: Birds of prey. Species invol... No Link NORTHERN IRELAND c33c2dfb-1194-45fd-9307-987badbaca59 2.936320e+08 68542.834255
1 3175 89513 LONDONDERRY Poisoning December 2007 C41 Species involved: Buzzard x 1. Tested positive... No Link NORTHERN IRELAND cb734612-000b-40ee-99c8-24d2941b7f12 3.029362e+08 69620.317845
2 3176 90307 DOWN Shooting August 2008 J24 Species involved: Red kite x 1. No Link NORTHERN IRELAND 94d7ae6a-41f8-4cfe-b33d-9a8e8b971eb4 2.934546e+08 68522.130071
3 3177 90393 ARMAGH Poisoning July 2008 J03 Species involved: Buzzard x 2; poison bait (ra... No Link NORTHERN IRELAND 4d303033-4e4c-4c6e-988e-a180b610de61 2.922799e+08 68384.842555
4 3178 90645 ARMAGH Poisoning July 2008 J03 Species involved: Buzzard x 2; crow x 1. Teste... No Link NORTHERN IRELAND 151bbc71-e663-4f6a-99ed-d9c38f33cf44 2.922799e+08 68384.842555
In [143]:
pd_join = pd.concat([df_2007_18])
pd_join.tail(3)
Out[143]:
OBJECTID RSPB_Reference County Incident_Type Month Year Grid_Square Details More_Info_Here Country GlobalID Shape__Area Shape__Length
1222 4396 100557 DEVON Shooting April 2018 SX86 Species involved: Buzzard x 1. No Link ENGLAND b965ae2a-82f4-4dad-a456-eac52bfa8c3b 2.466741e+08 62823.517595
1223 4397 100575 NORTH YORKSHIRE Shooting September 2018 SE16 Species involved: Red kite x 1. No Link ENGLAND 3224b1c5-5f22-4aed-84d4-5c13f60fcf3c 2.901774e+08 68138.445234
1224 4398 100678 STAFFORDSHIRE Poisoning June 2018 SJ91 Species involved: Peregrine falcon x 1. Tested... No Link ENGLAND c1a827f3-f637-4c02-8e32-54e9053dd206 2.724388e+08 66022.954235
In [144]:
df_join_gp = pd_join.groupby(['Incident_Type', 'Year', 'Month']).size().to_frame(name='Count').reset_index()
In [145]:
df_join_gp.head()
Out[145]:
Incident_Type Year Month Count
0 Illegal Pole/Spring Trapping 2007 August 1
1 Illegal Pole/Spring Trapping 2007 July 1
2 Illegal Pole/Spring Trapping 2007 March 1
3 Illegal Pole/Spring Trapping 2007 May 3
4 Illegal Pole/Spring Trapping 2007 September 1
In [152]:
df_join_gp_set_index = df_join_gp.set_index(['Month', 'Incident_Type',])
df_join_gp_set_index
Out[152]:
Year Count
Month Incident_Type
August Illegal Pole/Spring Trapping 2007 1
July Illegal Pole/Spring Trapping 2007 1
March Illegal Pole/Spring Trapping 2007 1
May Illegal Pole/Spring Trapping 2007 3
September Illegal Pole/Spring Trapping 2007 1
August Illegal Pole/Spring Trapping 2008 1
July Illegal Pole/Spring Trapping 2008 1
March Illegal Pole/Spring Trapping 2008 1
May Illegal Pole/Spring Trapping 2008 3
November Illegal Pole/Spring Trapping 2008 1
0 Illegal Pole/Spring Trapping 2009 2
April Illegal Pole/Spring Trapping 2009 2
March Illegal Pole/Spring Trapping 2009 1
November Illegal Pole/Spring Trapping 2009 1
September Illegal Pole/Spring Trapping 2009 1
August Illegal Pole/Spring Trapping 2010 2
June Illegal Pole/Spring Trapping 2010 6
May Illegal Pole/Spring Trapping 2010 1
September Illegal Pole/Spring Trapping 2010 2
June Illegal Pole/Spring Trapping 2011 1
May Illegal Pole/Spring Trapping 2011 2
April Illegal Pole/Spring Trapping 2012 1
February Illegal Pole/Spring Trapping 2012 1
January Illegal Pole/Spring Trapping 2012 1
July Illegal Pole/Spring Trapping 2012 1
May Illegal Pole/Spring Trapping 2012 1
September Illegal Pole/Spring Trapping 2012 1
August Illegal Pole/Spring Trapping 2013 2
December Illegal Pole/Spring Trapping 2013 1
February Illegal Pole/Spring Trapping 2013 4
... ... ... ...
June Shooting 2016 2
March Shooting 2016 3
May Shooting 2016 3
November Shooting 2016 4
October Shooting 2016 4
September Shooting 2016 6
April Shooting 2017 6
August Shooting 2017 5
December Shooting 2017 2
February Shooting 2017 4
January Shooting 2017 6
July Shooting 2017 1
June Shooting 2017 1
March Shooting 2017 8
May Shooting 2017 15
November Shooting 2017 3
October Shooting 2017 3
September Shooting 2017 7
0 Shooting 2018 1
April Shooting 2018 4
August Shooting 2018 2
February Shooting 2018 4
January Shooting 2018 2
July Shooting 2018 4
June Shooting 2018 2
March Shooting 2018 4
May Shooting 2018 7
November Shooting 2018 4
October Shooting 2018 4
September Shooting 2018 3

442 rows × 2 columns

In [153]:
df_join_gp_set_index.hvplot.bar(stacked=True, width=900, height=500, legend='left', rot=45)
Out[153]:
In [151]:
df_join_gp_set_index.hvplot.bar(stacked=False, width=900, height=600, legend='top_left', rot=90)
Out[151]:
In [154]:
df = pd.read_excel('Confirmed_Raptor_Persecution_Incidents_Public (1).xlsx')
In [155]:
df.head()
Out[155]:
OBJECTID RSPB_Reference County Incident_Type Month Year Grid_Square Details More_Info_Here Country GlobalID Shape__Area Shape__Length
0 3174 88956 ARMAGH Poisoning June 2007 H84 Species targeted: Birds of prey. Species invol... No Link NORTHERN IRELAND c33c2dfb-1194-45fd-9307-987badbaca59 2.936320e+08 68542.834255
1 3175 89513 LONDONDERRY Poisoning December 2007 C41 Species involved: Buzzard x 1. Tested positive... No Link NORTHERN IRELAND cb734612-000b-40ee-99c8-24d2941b7f12 3.029362e+08 69620.317845
2 3176 90307 DOWN Shooting August 2008 J24 Species involved: Red kite x 1. No Link NORTHERN IRELAND 94d7ae6a-41f8-4cfe-b33d-9a8e8b971eb4 2.934546e+08 68522.130071
3 3177 90393 ARMAGH Poisoning July 2008 J03 Species involved: Buzzard x 2; poison bait (ra... No Link NORTHERN IRELAND 4d303033-4e4c-4c6e-988e-a180b610de61 2.922799e+08 68384.842555
4 3178 90645 ARMAGH Poisoning July 2008 J03 Species involved: Buzzard x 2; crow x 1. Teste... No Link NORTHERN IRELAND 151bbc71-e663-4f6a-99ed-d9c38f33cf44 2.922799e+08 68384.842555
In [156]:
df.append(pd.DataFrame(df.sum(), index = ["Total"], columns=["County"]))
sort=False
/srv/conda/envs/notebook/lib/python3.7/site-packages/pandas/core/frame.py:6692: FutureWarning:

Sorting because non-concatenation axis is not aligned. A future version
of pandas will change to not sort by default.

To accept the future behavior, pass 'sort=False'.

To retain the current behavior and silence the warning, pass 'sort=True'.


In [157]:
df.append(pd.DataFrame(df.sum(), index = ["Total"], columns=["County"]))
sort=False
In [158]:
df.groupby(['County']).sum()
Out[158]:
OBJECTID RSPB_Reference Year Shape__Area Shape__Length
County
ABERDEENSHIRE 133937 3383812 72397 1.223869e+10 2.655068e+06
ANGUS 162505 4124508 88471 1.463127e+10 3.209420e+06
ANTRIM 54670 1642969 34230 5.121990e+09 1.180323e+06
ARGYLL AND BUTE 22072 563137 12063 1.944810e+09 4.320850e+05
ARMAGH 48011 1420385 30167 4.393508e+09 1.026860e+06
BEDFORDSHIRE 43413 1064035 22149 2.899822e+09 7.143996e+05
BERKSHIRE 14884 376099 8044 1.030829e+09 2.568522e+05
BLAENAU GWENT 7586 188601 4023 5.210307e+08 1.291240e+05
BRIDGEND 4338 100546 2018 2.583564e+08 6.429395e+04
BUCKINGHAMSHIRE 19449 478061 10063 1.304795e+09 3.230833e+05
CAERPHILLY 3480 91625 2009 2.605020e+08 6.456037e+04
CAMBRIDGESHIRE 62447 1537685 32205 4.287359e+09 1.047638e+06
CARMARTHENSHIRE 11545 286408 6037 7.890189e+08 1.946097e+05
CEREDIGION 19172 475089 10062 1.338633e+09 3.272464e+05
CHESHIRE 7925 193054 4027 5.573508e+08 1.335487e+05
CITY OF EDINBURGH 7363 188109 4020 6.341246e+08 1.424501e+05
CLEVELAND 11261 281508 6035 8.894957e+08 2.066298e+05
CONWY 19808 483107 10067 1.394845e+09 3.340476e+05
CORNWALL 41264 1039524 22124 2.705283e+09 6.900170e+05
COUNTY DURHAM 92126 2285990 48294 7.185547e+09 1.661092e+06
CUMBRIA 136526 3426241 72428 1.069670e+10 2.482166e+06
DENBIGHSHIRE 22897 569143 12070 1.658680e+09 3.990398e+05
DERBYSHIRE 113163 2781881 58372 8.103264e+09 1.939036e+06
DEVON 59312 1448121 30200 3.735915e+09 9.468944e+05
DORSET 18870 474830 10059 1.251301e+09 3.163923e+05
DOWN 90080 2711026 56379 8.215661e+09 1.918486e+06
DUMFRIES AND GALLOWAY 102682 2560039 54323 8.244887e+09 1.887246e+06
EAST AYRSHIRE 33090 850038 18094 2.807494e+09 6.358297e+05
EAST LOTHIAN 19764 480718 10067 1.587523e+09 3.563726e+05
EAST RIDING OF YORKSHIRE 86205 2111301 44291 6.330203e+09 1.492721e+06
... ... ... ... ... ...
PEMBROKESHIRE 11324 283001 6034 7.820447e+08 1.937472e+05
PERTH AND KINROSS 159491 4046837 86471 1.412837e+10 3.117712e+06
POWYS 114628 2794829 58385 7.700137e+09 1.890124e+06
RENFREWSHIRE 3942 96351 2013 3.245131e+08 7.205705e+04
RHONDDA, CYNON, TAFF 4214 99068 2016 2.604022e+08 6.454800e+04
SCOTTISH BORDERS 219192 5445664 114707 1.793632e+10 4.044486e+06
SHROPSHIRE 88827 2245051 48258 6.468525e+09 1.576039e+06
SOMERSET & AVON 47512 1157325 24161 3.048007e+09 7.649889e+05
SOUTH AYRSHIRE 14288 366844 8037 1.240692e+09 2.817877e+05
SOUTH GLAMORGAN 4326 99942 2018 2.573802e+08 6.417236e+04
SOUTH LANARKSHIRE 139152 3509500 74424 1.152360e+10 2.611885e+06
SOUTH YORKSHIRE 32609 780413 16119 2.254271e+09 5.371655e+05
STAFFORDSHIRE 60117 1508600 32186 4.359196e+09 1.056382e+06
STIRLING 63411 1596552 34189 5.457681e+09 1.218395e+06
SUFFOLK 68330 1648157 34239 4.521265e+09 1.108953e+06
SURREY 26276 663204 14078 1.782134e+09 4.467649e+05
SWANSEA CITY 3676 93904 2010 2.581797e+08 6.427195e+04
TORFAEN 11097 282307 6032 7.815861e+08 1.936910e+05
TYNE AND WEAR 3536 92565 2009 3.018331e+08 6.949345e+04
TYRONE 28981 873521 18125 2.665276e+09 6.195139e+05
VALE OF GLAMORGAN 7619 189173 4024 5.128149e+08 1.281020e+05
WARWICKSHIRE 24834 588518 12093 1.603795e+09 3.923820e+05
WEST DUNBARTONSHIRE 3499 92071 2009 3.195049e+08 7.149887e+04
WEST MIDLANDS 21859 557589 12061 1.621320e+09 3.945210e+05
WEST SUSSEX 15127 377864 8047 1.009443e+09 2.541739e+05
WEST YORKSHIRE 83610 2025427 42289 6.003761e+09 1.420296e+06
WESTERN ISLES 8148 196094 4029 7.239704e+08 1.522072e+05
WILTSHIRE 38195 948851 20122 2.556537e+09 6.395647e+05
WORCESTERSHIRE 16303 389500 8060 1.066669e+09 2.612788e+05
WREXHAM 8326 196769 4031 5.514511e+08 1.328400e+05

94 rows × 5 columns

In [159]:
df.groupby('County')
Out[159]:
<pandas.core.groupby.generic.DataFrameGroupBy object at 0x7f75c9f459d0>
In [160]:
df["County"].value_counts(dropna=False)
Out[160]:
NORTH YORKSHIRE             131
HIGHLAND                     70
SCOTTISH BORDERS             57
ANGUS                        44
PERTH AND KINROSS            43
SOUTH LANARKSHIRE            37
NORFOLK                      37
CUMBRIA                      36
ABERDEENSHIRE                36
HEREFORDSHIRE                30
POWYS                        29
DERBYSHIRE                   29
DOWN                         28
DUMFRIES AND GALLOWAY        27
COUNTY DURHAM                24
LINCOLNSHIRE                 24
SHROPSHIRE                   24
EAST RIDING OF YORKSHIRE     22
WEST YORKSHIRE               21
NORTHUMBERLAND               19
ANTRIM                       17
STIRLING                     17
SUFFOLK                      17
STAFFORDSHIRE                16
CAMBRIDGESHIRE               16
ARMAGH                       15
DEVON                        15
HERTFORDSHIRE                15
LANCASHIRE                   15
SOMERSET & AVON              12
                           ... 
SOUTH AYRSHIRE                4
GREATER LONDON                3
ESSEX                         3
PEMBROKESHIRE                 3
CARMARTHENSHIRE               3
OXFORDSHIRE                   3
TORFAEN                       3
CLEVELAND                     3
NORTH LANARKSHIRE             3
FLINTSHIRE                    3
VALE OF GLAMORGAN             2
BLAENAU GWENT                 2
GWYNEDD                       2
CHESHIRE                      2
NEATH PORT TALBOT             2
FALKIRK                       2
ISLE OF ANGLESEY              2
WESTERN ISLES                 2
CITY OF EDINBURGH             2
WREXHAM                       2
RHONDDA, CYNON, TAFF          1
TYNE AND WEAR                 1
SOUTH GLAMORGAN               1
WEST DUNBARTONSHIRE           1
RENFREWSHIRE                  1
SWANSEA CITY                  1
GLASGOW                       1
BRIDGEND                      1
EDINBURGH CITY                1
CAERPHILLY                    1
Name: County, Length: 94, dtype: int64

North Yorkshire is the highest and then the Highlands in Scotland

In [162]:
import pandas as pd

with open('out.csv', 'w') as out:

    for col in df.columns[1:]:

        res = df[col].value_counts()\
                     .reset_index()\
                     .rename(columns={col: 'count', 'index': col})\

        res.to_csv(out, index=False)

creating a totals dataframe from the workbook into excel to read later

In [163]:
import folium
import pandas as pd
import json
import os
import requests
import numpy as np
import geopandas as gpd
import matplotlib.pyplot as plt
%matplotlib inline
In [164]:
boundaries =('Confirmed_Raptor_Persecution_Incidents_Public (4).geojson')
map_df = gpd.read_file(boundaries)
In [165]:
map_df.head(2)
Out[165]:
OBJECTID RSPB_Reference County Incident_Type Month Year Grid_Square Details More_Info_Here Country GlobalID Shape__Area Shape__Length geometry
0 3174 88956 ARMAGH Poisoning June 2007 H84 Species targeted: Birds of prey. Species invol... No Link NORTHERN IRELAND c33c2dfb-1194-45fd-9307-987badbaca59 2.936320e+08 68542.834255 POLYGON ((-6.77187 54.30253, -6.61831 54.30087...
1 3175 89513 LONDONDERRY Poisoning December 2007 C41 Species involved: Buzzard x 1. Tested positive... No Link NORTHERN IRELAND cb734612-000b-40ee-99c8-24d2941b7f12 3.029362e+08 69620.317845 POLYGON ((-7.37670 54.93600, -7.22071 54.93510...
In [166]:
df = pd.read_excel('out.xlsx')
In [167]:
df.head()
Out[167]:
County Total
0 NORTH YORKSHIRE 131
1 HIGHLAND 70
2 SCOTTISH BORDERS 57
3 ANGUS 44
4 PERTH AND KINROSS 43
In [168]:
merged = df.set_index("County", "Total").join(map_df.set_index("County", "Total"))
In [169]:
merged = merged[merged['Total'].notnull()]
merged.head()
Out[169]:
Total OBJECTID RSPB_Reference Incident_Type Month Year Grid_Square Details More_Info_Here Country GlobalID Shape__Area Shape__Length geometry
County
ABERDEENSHIRE 36 3267 88370 Illegal Trapping (Other) April 2007 NJ93 Species involved: Buzzard x 1. No Link SCOTLAND 16c9d9d8-8f4a-4b50-9858-42fd2b4c22b3 3.438907e+08 74177.227186 POLYGON ((-2.16787 57.36037, -2.00165 57.36048...
ABERDEENSHIRE 36 3288 88508 Poisoning May 2007 NJ72 Species involved: Peregrine falcon x 2; poison... No Link SCOTLAND 39ace985-d958-4517-ac60-9ee5e3659cde 3.422005e+08 73994.715182 POLYGON ((-2.49908 57.26966, -2.33327 57.27021...
ABERDEENSHIRE 36 3329 88821 Illegal Pole/Spring Trapping September 2007 NJ41 Species involved: Barn owl x 1. No Link SCOTLAND b1795066-8567-41e6-8c59-1b7ff0aa87de 3.404733e+08 73807.738992 POLYGON ((-2.99403 57.17689, -2.82865 57.17809...
ABERDEENSHIRE 36 3342 88973 Shooting August 2007 NJ73 Species involved: Buzzard x 1. No Link SCOTLAND 2d4e0885-bd06-43d8-861c-d45082cec4d4 3.438732e+08 74175.337152 POLYGON ((-2.50030 57.35949, -2.33408 57.36004...
ABERDEENSHIRE 36 3343 88979 Shooting November 2007 NJ70 Species involved: Buzzard x 1. No Link SCOTLAND 65852bd9-af20-41ce-9e00-ec81f697ad8f 3.388966e+08 73636.643687 POLYGON ((-2.49666 57.09001, -2.33166 57.09055...
In [171]:
variable = 'Total'
vmin, vmax = 1,132
fig, ax = plt.subplots(1, figsize=(12, 8))
ax.axis("off")
plt.title('Birds persecutions 2007-2018')

merged.plot(variable, cmap='Blues', linewidth=0.4, markeredgecolor=0.4, ax=ax)
sm = plt.cm.ScalarMappable(cmap='Blues', norm=plt.Normalize(vmin=vmin, vmax=vmax))
sm._A = []
cbar = fig.colorbar(sm)
In [172]:
merged = merged.reset_index()
In [189]:
map_df.plot()
Out[189]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f75c92cb690>
In [270]:
m = folium.Map([52.6333, -1.1333], zoom_start=7, tiles="Stamen Terrain", control_scale=True)

choropleth =  folium.Choropleth(
    geo_data=boundaries,
    data=merged,
    columns=['Incident_Type', 'Total'],
    key_on='feature.properties.County',
    threshold_scale=[0, 5, 10, 15, 50, 135],
    fill_color='PuBu', #options BuGn, BuPu, GnBu, OrRd, PuBu, PuBuGn, PuRd, RdPu, YlGn, YlGnBu, YlOrBr, and YlOrRd
    bins=6,
    legend_name='Number of birds persecuted 2007-2018',
).add_to(m)
choropleth.geojson.add_child(
    folium.features.GeoJsonTooltip(['Incident_Type', 'County', 'Month'])
)
m
Out[270]:

Contents Contents 1 Table of figures 1

  1. What exactly is a bird? 2 1.1 Guidelines set out from relevant stakeholders 2 1.2 Acts of parliament 2
  2. The Royal Society for Protection of Birds (RSPB) 3 2.1 The bird situation from an environmental point of view 3 2.3 The Migration of birds and the global environment 4
  3. Wildlife crime and birds 6 3.1 Problems facing convictions 7
  4. Methods for solutions criminological perpespectives 8 8 Problem Analysis Triangle (PAT) 8 Reference list 10

Table of figures Figure 1. Taken from become a problem solving analyst in 55 small steps (2003). 8

  1. What exactly is a bird? The dictionary describes a bird as- ‘warn-blooded, egg-laying vertebrate distinguishable by possessing feathers, wings, beaks and typically being able to fly’.

    ‘The class known as Aves: are periodically categorized by being evolved from the Jurassic period from small dinosaurs where they too had some similar features, were warm blooded and relatively small in size’. (Lexico, 2020).

1.1 Guidelines set out from relevant stakeholders

Legality in the United Kingdom (UK) to use and hunt birds in described in the Government website GOV.UK (2020). This is a by no means absolute, more of a guideline especially when if the land belongs to the owner and the bird type is possibly causing agricultural and farm animal complication’s.

However, the constrictions exist for shooting and hunting of birds. Should only be done within season for game, waterfowl and quarry birds. For specific dates see (https://basc.org.uk/advice/quarry-species-shooting-seasons/). The government website also has a spectrum of the type of firearms, ammunition, that cannot be utilised when hunting and shooting birds such as ‘no more than 2 rounds of ammunition’. To hunt with a falcon, a falconry licence must be obtained as well. Furthermore, it specifies the ethical ways to hunt and shoot birds to aid the potential hunter to manage their integrity whilst carrying out these types of activities for the purposes of rules of engagement, to manage land, food consumption or for sports purposes.

1.2 Acts of parliament

Specifically, the Wildlife and Countryside Act.c.69 Part 1 (1981) ‘(1) Subject to the provisions of this Part, if any person intentionally— (a)kills, injures or takes any wild bird; (aa)takes, damages or destroys the nest of a wild bird included in Schedule (b)takes, damages or destroys the nest of any wild bird while that nest is in use or being built; or (c)takes or destroys an egg of any wild bird, he shall be guilty of an offence. (2)Subject to the provisions of this Part, if any person has in his possession or control— (a)any live or dead wild bird or any part of, or anything derived from, such a bird; or (b)an egg of a wild bird or any part of such an egg, he shall be guilty of an offence.

The conviction depending on severity is, unlimited fine, imprisonment for up to six months or both.

  1. The Royal Society for Protection of Birds (RSPB)

    The RSPB, Our History (2020) was founded by Emily Williamson in 1889 for the destruction of the use of feathers for the new fashionable hats in the Victorian era and moved to destructs the fur coat fashion at the time. Over many years her society grew and purchased land for conservation and passed new acts of parliament protecting birds (of which we still have today) but amended. Present day: RSPB has thousands of members of which contribute to the society enabling, the purchasing of land including greater London/Essex, places in Ireland, that which includes farmlands and areas in the Isle of Wight. Protecting certain species and creating wildlife projects to flourish habitats for Aves. Her legacy has continued to push for more wildlife conservationism that has even expanded to UK bases abroad for example, Cyprus.

2.1 The bird situation from an environmental point of view

The decline of birds as been gradual over the past 30 years and more recently in past 10 years as the RSPB describes Is the number of birds in decline? (2020). The decline has been seen more in farmland birds such as the Skylark and now, followed by woodland birds such as the Blue Tit. This is because, newer agricultural practices to increase efficiency, crop sowing and specialisation farming, that has stripped land back and decreased the natural food/water resources and nesting for birds. The same can be said for the agricultural practices throughout Europe. The Common Agricultural Policy (2003) is a step in the right direction in combating the massive decline are European agricultural practices as birds’ migrations takes place globally.

It has been suggested to the agricultural society that a multifunctional objectives need to be implemented Bradbury, R. B and Kirby, W. B. (2006) to create wet habits for birds for probing species and for their natural food and water resources to prevent catastrophic decline to resulting in extinctions. The decline can be reversed though, by such an implementation as they are overlooked in farming industry. This is also to diffuse pollution by water run of and soil compaction and chemical pesticides and herbicides creating severe floods and the quality of water is furthered diminished for the biodiversity of birds, and the introduction of non-native species with urbanisation making predatory birds less predatory.

Land sparing is another strategy that has and need to be more implemented as an approach to conservation for biodiversity that without it birds will indefinitely decline. This is because, birds are an indicator of a flourishing environment and land sparing as potential to populate species status. A study conducted by Lamb, A et al. (2019) for the United Kingdom forecast the predictions that land sparing can increase woodland and wetland bird’s species populations but, will have a slight decrease for farmland birds. This decline can be counteracted by good farming practices as suggested and, to be used in Europe to keep species from declining resulting from the migration seasons.

2.3 The Migration of birds and the global environment

Meaning of Weather (2020): ‘’the state of the atmosphere with respect to wind, temperature, cloudiness, moisture, pressure, etc’’.

Basic meaning of climate change by the Environmental Protection Agency: ‘any significant change in the measures of climate lasting for an extended period of time” and global warming as “the recent and ongoing rise in global average temperature near Earth's surface…caused mostly by increasing concentrations of greenhouse gases in the atmosphere, which trap infrared heat causing a warming effect’’ Critically describing climate change as; The warming of the earth by industrialisation which in turn can cause rises in sea levels and ironically droughts or extreme weather such as Tsunami exacerbated by the industrial revolution and the production of greenhouse gases. The damaging effects of climate change are amplified in a rising population and the extraction natural resources.

Certain bird species migrate and travel to many places across the globe during summer or winter (Reed, O. 2018) to Scandinavia, Eastern Europe also Africa (National Geographic, 2018). The reasons for this can vary. Such as for weather, food, water resources, nest and lay eggs (Which birds migrate? 2020). However, the degree of global warming, wars (terrorism) decimating countries urban and suburban stripping it’s environments, plastic pollutions and localised weather extreme fluctuations have contributed to perilous journeys to and from the UK with consequences of eradicating whole species.

Plastic pollution especially in the ocean is having huge affect in seabirds species decline, 32 billion tonnes of plastic is reported by 2016 (SAS,2020). As plastic enters a seabird food source-fish so does it enter the seabird in particular and thus slowly poisons the bird from the toxicity.

Sewage that has to travel from stream to river into the sea pollutes water for the bird to drink and that of its food source algae and fish. In 1990 it was reported that 27% of water was safe for bathing in the sea in the UK compared to now which is 96% (SAG, 2020). Furthermore, it was in past decades that sewage overflow created real problems.

More recently phenomena like locust plague in Africa have decimated crops for feeding (Stone, M, 2020) and migration to Australia by wetland birds (sandpiper) could further eradicate species for example the bush fires that sweeping through (Australia fires: a visual guide to bushfire crisis, 2020). Would likely cause early migration back to the UK or they may choose to head to a different country altogether which may upset the ecological balance of the new destination country for migration.

  1. Wildlife crime and birds

Wildlife crime is anything that contravenes current legislations e.g. Bird of Prey persecution – through poisoning, trapping, shooting, disturbance of nest and/or theft of chicks. Many police forces have dedicated special units to combat any such cases including the National Crime Agency, and other stakeholders such as the RSPCA (UK National Wildlife Crime Unit, 2020).

Organised criminals have specialised in stealing bird eggs and birds of prey such as owls (to ship they need to be kept warm and fed) and is increasing due to foreign interest where birds of prey hard to come by and owning one is seen as a status symbol, can be sold onto the black market for thousands of pounds and shipped to countries like Saudi Arabia to name a few.

A report of a man from Norfolk was convicted of stealing over five thousand bird eggs (Norfolk man illegally hoarded 5,000 rare eggs jailed, 2018). This caused baby birds in some sites a zero-survival rate this included, 298 species some rare birds meant that some species ‘’would not recover’’. However, this demonstrates how easy it can be to locate and, steal eggs. This was one man with a bird eggs hoarding addiction as he was not a seller. Here the legislation has be exercised, but the repercussions of it are low. However, if he was also selling on the black market the sentence would be much higher with the fine being unlimited one. He received a just an eighteen months sentence, the fine was not disclosed.

Operation Owl (2020) launched this 17th February governed by The National Police Chief Council, North Yorkshire Police, the Royal Society for the Protection of Birds and the RSPCA, together with the North York Moors and Yorkshire Dales National Parks. is a task force dedicated to finding those responsible in raptor related crimes. They concentrate on hot spots where known persecutions have occurred and aim to disrupt the offenders as birds like the peregrines (and a few others) are being targeted especially.

3.1 Problems facing convictions

Annual wildlife report as summarised the issues from crime scene to court, to gain convictions in wildlife crimes is as follows:

‘Examples are where police control rooms fail to recognise the complaint as a police matter, referring it to the RSPCA, or secondly where the complaint is accepted, officers often have no power or training to undertake investigations and basic procedural failures ensue, which include crime scenes not being examined to prove the badger sett was in current use or forensic evidence is lost. The continual pressure on police resources does not assist. The lack of available and rapid access to competent or expert witnesses is problematic. Court cases are often heavily contested by defence specialists, ranging from barristers to solicitors’, report on: Wildlife Crime (2017).

  1. Methods for solutions criminological perspectives

     Problem Analysis Triangle
In [3]:
from IPython.display import IFrame
IFrame("Triangle-for-problem-analysis (1).png", width=560, height=315)
Out[3]:

Figure 1. Taken from become a Center for Problem- Oriented Policing (2003).

Crime= bird egg thefts,shooting ,trapping and posioning. Offender= could be someonely posing as hicker or rural walker in order to have legigitmate and discrescionary means to being in the perticular areas Place= Usually wildbirds location is rural as the geography (see heatmap above) Target/Victim= the hunted bird and its eggs (if any) this could be one that is on the list as most vualable to catch and sell. Handlers= This could be Police officers, signs and posters or news about bird crimes articles offenders read in and around close to crime hotspots. Applying harser fines and sentences if caught. Managers= Ranger and their staff to maintain aware and find ways to deter offenders such as placing camera traps near a nest site.
Guardians= The bird stopping the theft of its eggs the bird itself if its of a prey type as most birds work in pairs when hunting and guarding their hunting area. Other hickers and nature walkers. Rational choices determined by social, cultral, economical and emotional systems Gharajedaghi, J. (2011) will ultimetley deter or re-enforce this type of crime and as such environmental crimes and environmental problems, such as plastics, that’s likely causing birds to decrease further. This can be analysed by braking down three components: the monitoring, enforcement and prevention. In more by understanding how wildlife crime as a whole also, branches out directly with transnational organized crimes, terror groups, corruption, and other illicit markets, Moreto. D. W and Pires. F. S. (2018). Therefore having a spatial appraoch in combating specific crimes such as one linked to birds can aid the right logistical, stratigical and expert tools, specialist stakeholders and financial resources for combatting this crime, By Hook or by Crook a reference manual on illegal wildlife trade and prosecutions in the United Kingdom (1998).

In [ ]:
 

Refrence List

  1. BASC (2020) ‘Quarry species & shooting season’. The association for Shooting & Conservation. Available at: https://basc.org.uk/advice/quarry-species-shooting-seasons/ (Accessed: 4th March 2020).

  2. BBC News (2020) ‘Australia fires: a visual guide to bushfire crisis’. Broadcasting House. Portland place: London, W1A 1AA. Available at: https://www.bbc.co.uk/news/world-australia-50951043 (Accessed:24th February 2020).

  3. BBC News (2018) ‘Norfolk man illegally hoarded 5,000 rare eggs jailed’. Broadcasting House. Portland place: London, W1A 1AA. Available at: https://www.bbc.co.uk/news/uk-england-norfolk-46358627 (Accessed: 24th February 2020).

  4. Bradbury, R. B and Kirby, W. B. (2006) ‘Farmland birds and resource protection in the UK: cross-cutting solutions for multi-functional farming’? Biological Conservation, 129 (4), pp. 530-542.

  5. British Trust for Ornithology (BTO), Royal Society for the Protection of Birds (RSPB) (2019) released: 7th November 2019. ‘Statistical dataset NV07-wild bird population in the UK’. Biodiversity and Ecosystem Evidence, Department for Environment Food and Rural Affairs, Foss House, Kings Pool,1-2 Peasholme Green: York, YO1 7PX. Download available at: https://www.gov.uk/government/statistical-data-sets/env07-wild-bird-populations-in-the-uk (Accessed: 11th November 2019).

  6. Cambridge Dictionary. (2020) ‘Weather noun’. Cambridge University Press. Available at: https://dictionary.cambridge.org/dictionary/english/weather (Accessed: 8th January 2020).

  7. Scott, M. Clarke, V, R. and Newman, R, G. (2018) ‘The problem analysis triangle’, Center for Problem-Oriented Policing, University at Albany, New York. Available at: http://www.popcenter.org/about/?p=triangle (Accessed: 4th May 2020).

  1. Holden, J. (1998) ‘Illegal wildlife trade in the United Kingdom-native species’. By Hook or by Crook a reference manual on illegal wildlife trade and prosecutions in the United Kingdom, The Royal Society for the Protection of Birds, pp.11-14.

  2. GOV.UK. (2020) ‘Hunting and shooting wildlife’. Available at: https://www.gov.uk/hunting/Birds (Accessed: 21st February 2020).

  3. Gharajedaghi, J. (2011) ‘System theory: the nature of the beast’. 3rd edn, in Pam Chester/Rachel Roumeliotis (eds.). System Thinking managing chaos and Complexity: A platform for Designing Business Architecture, London: Elsevier Science & Technology, pp. 29-54.

  1. Gray, R. (2018) ‘The strange reason owl thefts may be on the rise’. BBC Worklife. Available at: https://www.bbc.com/worklife/article/20180626-why-owls-might-suffer-in-a-cashless-society (Accessed: 5th March 2020)

  2. RSPB (2020) ‘Is the number of birds in decline?’ RSPB The Lodge, Potter Road: Sandy, SG19 2DL. Available at: https://www.rspb.org.uk/birds-and-wildlife/advice/how-you-can-help-birds/where-have-all-the-birds-gone/is-the-number-of-birds-in-decline/
    (Accessed: 24th February 2020).

  3. RSPB (2020) ‘Which birds migrate?’ RSPB The Lodge, Potter Road: Sandy, SG19 2DL. Available at: https://www.rspb.org.uk/birds-and-wildlife/natures-home-magazine/birds-and-wildlife-articles/migration/which-birds-migrate/ (Accessed: 24th February 2020).

  4. RSPB (2020) ‘Our history’. RSPB The Lodge, Potter Road: Sandy, SG19 2DL. Available at: https://www.rspb.org.uk/about-the-rspb/about-us/our-history/ (Accessed: 24th February 2020).

  5. RSPB (2020) ‘Population trends’ RSPB The Lodge, Potter Road: Sandy, SG19 2DL. Available at: https://www.rspb.org.uk/birds-and-wildlife/wildlife-guides/bird-a-z/kestrel/population-trends/ (Accessed: 23rd February 2020).

  6. Reed, O. (2018) ’10 epic journeys of Britain’s winter migrant birds’. National Geographic UK. Available at: https://www.nationalgeographic.co.uk/animals/2018/10/10-epic-journeys-britains-winter-migrant-birds (Accessed: 24th February 2020).

  7. SAS. (2020) ‘Plastic pollution facts and figures.’ Surfers Against Sewage, Wheal Kitty Workshop, St Agnes: Cornwall, TR5 0RD. Available at: https://www.sas.org.uk/our-work/plastic-pollution/plastic-pollution-facts-figures/ (Accessed: 24th February 2020).

  8. SAS. (2020) ‘Water quality.’ Surfers Against Sewage, Wheal Kitty Workshop, St Agnes: Cornwall, TR5 0RD. Available at: https://www.sas.org.uk/our-work/water-quality/ (Accessed: 24th February 2020).

  9. Lamb, A et al. (2019) ‘The consequences of land sparing for birds in the United Kingdom’. Journal Applied Ecology, 56 (8), pp. 1870-1881.

  10. Lexico. (2020) ‘Definition of a bird in English’. Lexico Powered by OXFORD. Available at: https://www.lexico.com/en/definition/bird (Accessed: 21st February 2020).

  11. Moreto. D. W and Pires. F. S. (2018) ‘Extending beyond wildlife: links with transnational organised crime, terror groups, corruption and illicit markets’ (no eds.). Wildlife crime: an environmental criminology and crime science, United States of America: Carolina Academic Press, LLC, pp.29-38.

  12. National Geographic. (2018) Billions of birds migrate. Where do they go? Available at: https://www.nationalgeographic.com/magazine/2018/03/bird-migration-interactive-maps/ (Accessed: 22nd February 2020.)

  13. National Police Chiefs’ Council (2020) Operation Owl Available at: https://www.operationowl.com/ (Accessed: 4th March 2020).

  14. NWCU (2020) ‘What is wildlife crime’. UK National Wildlife Crime Unit. Available at: https://www.nwcu.police.uk/what-is-wildlife-crime/ (Accessed: 24th February 2020).

  15. Stone, M. (2020) ‘A plague of locusts has descended on east Africa, climate change is may be to blame’. National Geographic. Available at: https://www.nationalgeographic.co.uk/environment-and-conservation/2020/02/plague-of-locusts-has-descended-east-africa-climate-change-may (Accessed:24th February 2020).

  16. The European Parliament (2003) ‘The common agricultural policy (cap) and the treaty’. Fact Sheets of The European Union. Available at: (https://www.europarl.europa.eu/factsheets/en/sheet/103/the-common-agricultural-policy-cap-and-the-treaty (Accessed: 4th March 2020).

  17. United States Environmental Protection Agency (2017) Climate Change: Basic Information. Available at: https://19january2017snapshot.epa.gov/climatechange/climate-change-basic-information_.html (Accessed: 5th January 2020).

  18. Wildlife and Countryside Act.c.69 Part 1 (1981) Available at: http://www.legislation.gov.uk/ukpga/1981/69/contents (Accessed: 24th February 2020).

  19. Wildlife and Countryside Link (2017) ‘A report on the scale of wildlife crime in England and Wales’. Wildlife Crime in 2017. Pdf download: https://www.wcl.org.uk/docs/Link_Annual_Wildlife_Crime_Report_2017_FINAL.pdf